summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2010-06-22 11:53:03 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2010-08-05 11:39:07 (GMT)
commitf3f95d4282ffbfb307e98d20a166ced4cc982061 (patch)
tree2ebf22bcb63c36867bef46777befe1f8f81c6366 /src/xmlpatterns
parent7de8a0c487ce6a7f13c2028e93648807ef7d8e8b (diff)
downloadQt-f3f95d4282ffbfb307e98d20a166ced4cc982061.zip
Qt-f3f95d4282ffbfb307e98d20a166ced4cc982061.tar.gz
Qt-f3f95d4282ffbfb307e98d20a166ced4cc982061.tar.bz2
QXmlPatterns QAbstractDateTime: only parse 3 digits of time fraction
the XML Schema dateTime type allows for an unlimited precision of fractial time values; this fails for 4 or more digits when creating a QTime. This patch takes only 3 digits of the time fraction into account, since we cannot store more in a QTime or QDateTime anyway. Reviewed-by: Olivier Goffart Task-number: QTBUG-11559
Diffstat (limited to 'src/xmlpatterns')
-rw-r--r--src/xmlpatterns/data/qabstractdatetime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/data/qabstractdatetime.cpp b/src/xmlpatterns/data/qabstractdatetime.cpp
index 6329fbe..a298698 100644
--- a/src/xmlpatterns/data/qabstractdatetime.cpp
+++ b/src/xmlpatterns/data/qabstractdatetime.cpp
@@ -163,7 +163,7 @@ QDateTime AbstractDateTime::create(AtomicValue::Ptr &errorMessage,
QString msecondsStr(getSafeCapt(mseconds));
if(!msecondsStr.isEmpty())
- msecondsStr = msecondsStr.leftJustified(3, QLatin1Char('0'));
+ msecondsStr = msecondsStr.leftJustified(3, QLatin1Char('0'), true);
const MSecondProperty msecs = msecondsStr.toInt();
if(hour == 24)