summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/data
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-07-17 13:50:04 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-07-19 08:26:15 +0000
commit72ba369a115d97f707cbe6131d8daa751dc5b355 (patch)
treed62e778f5c1bdc1615bd888c030e3f2f003717ec /src/xmlpatterns/data
parentd75868d02ad37dce5806a8d1313b123ff6ce6c09 (diff)
downloadqtxmlpatterns-72ba369a115d97f707cbe6131d8daa751dc5b355.tar.gz
Fix type of QCommonValues::YearMonthDurationZero
As reported by UBSan: src/corelib/tools/qshareddata.h:167:13: runtime error: downcast of address 0x0000023ce510 which does not point to an object of type 'DayTimeDuration' 0x0000023ce510: note: object is of type 'QPatternist::YearMonthDuration' 00 00 00 00 90 6c 52 5b 1f 2b 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 31 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QPatternist::YearMonthDuration' Another victim of QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST... Change-Id: I121433e0d2ad8b203ccf9d9f08bd166b39502cbb Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/xmlpatterns/data')
-rw-r--r--src/xmlpatterns/data/qcommonvalues.cpp2
-rw-r--r--src/xmlpatterns/data/qcommonvalues_p.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/xmlpatterns/data/qcommonvalues.cpp b/src/xmlpatterns/data/qcommonvalues.cpp
index 6fa3738..c9eee2d 100644
--- a/src/xmlpatterns/data/qcommonvalues.cpp
+++ b/src/xmlpatterns/data/qcommonvalues.cpp
@@ -108,7 +108,7 @@ const AtomicValue::Ptr CommonValues::InfFloat
const DayTimeDuration::Ptr CommonValues::DayTimeDurationZero
(DayTimeDuration::fromSeconds(0));
-const DayTimeDuration::Ptr CommonValues::YearMonthDurationZero
+const YearMonthDuration::Ptr CommonValues::YearMonthDurationZero
(YearMonthDuration::fromComponents(true, 0, 0));
diff --git a/src/xmlpatterns/data/qcommonvalues_p.h b/src/xmlpatterns/data/qcommonvalues_p.h
index 9b84de9..00e9507 100644
--- a/src/xmlpatterns/data/qcommonvalues_p.h
+++ b/src/xmlpatterns/data/qcommonvalues_p.h
@@ -198,7 +198,7 @@ namespace QPatternist
/**
* The @c xs:yearMonthDuration value P0M
*/
- static const DayTimeDuration::Ptr YearMonthDurationZero;
+ static const YearMonthDuration::Ptr YearMonthDurationZero;
private:
/**