aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 88f9a39ab8..b67ee148f4 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -1473,7 +1473,10 @@ void tst_qqmllanguage::dynamicProperties()
QCOMPARE(object->property("stringProperty"), QVariant("Hello World!"));
QCOMPARE(object->property("urlProperty"), QVariant(QUrl("main.qml")));
QCOMPARE(object->property("colorProperty"), QVariant(QColor("red")));
- QCOMPARE(object->property("dateProperty"), QVariant(QDate(1945, 9, 2)));
+ QVariant date = object->property("dateProperty");
+ if (!date.convert(QMetaType::QDate))
+ QFAIL("could not convert to date");
+ QCOMPARE(date, QVariant(QDate(1945, 9, 2)));
QCOMPARE(object->property("varProperty"), QVariant("Hello World!"));
}