diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-06-24 11:59:08 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-06-25 09:40:00 +0200 |
commit | 5c672954e391d43e1fb94e6d76aaedc987dea468 (patch) | |
tree | 9fc726428c822ff29d2214f4e270738204aecfbf /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | f25e4c60f6ff2c200d2bf1c94d0dafa966c5c98f (diff) |
Drop special casing of QDateTime when setting values
This introduced inconsistency in order to be compatible with V8 and Qt
5.0/5.1, respectively. We don't need to do this anymore. We standardize
on the behavior observed when statically setting a property in QML, e.g.
"foo: '2014-03-03'", rather than the behavior observed when dynamically
setting it from JavaScript.
[ChangeLog][Important Behavior Changes] Dates are interpreted the same
way when assigned to QML properties as when parsed in JavaScript now.
The time zone is generally left alone, not forced to UTC in some cases.
Fixes: QTBUG-36635
Change-Id: I72a7045d7b39ee1c6e0ac1ef55d74ef8aa505f00
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 2e43642ecd..2bfd6700d9 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -471,7 +471,7 @@ void tst_qqmlecmascript::assignBasicTypes() QCOMPARE(object->colorProperty(), QColor("red")); QCOMPARE(object->dateProperty(), QDate(1982, 11, 25)); QCOMPARE(object->timeProperty(), QTime(11, 11, 32)); - QCOMPARE(object->dateTimeProperty(), QDateTime(QDate(2009, 5, 12), QTime(13, 22, 1), Qt::UTC)); + QCOMPARE(object->dateTimeProperty(), QDateTime(QDate(2009, 5, 12), QTime(13, 22, 1))); QCOMPARE(object->pointProperty(), QPoint(99,13)); QCOMPARE(object->pointFProperty(), QPointF(-10.1, 12.3)); QCOMPARE(object->sizeProperty(), QSize(99, 13)); @@ -500,7 +500,7 @@ void tst_qqmlecmascript::assignBasicTypes() QCOMPARE(object->colorProperty(), QColor("red")); QCOMPARE(object->dateProperty(), QDate(1982, 11, 25)); QCOMPARE(object->timeProperty(), QTime(11, 11, 32)); - QCOMPARE(object->dateTimeProperty(), QDateTime(QDate(2009, 5, 12), QTime(13, 22, 1), Qt::UTC)); + QCOMPARE(object->dateTimeProperty(), QDateTime(QDate(2009, 5, 12), QTime(13, 22, 1))); QCOMPARE(object->pointProperty(), QPoint(99,13)); QCOMPARE(object->pointFProperty(), QPointF(-10.1, 12.3)); QCOMPARE(object->sizeProperty(), QSize(99, 13)); |