From 7a5987b360b63a479737edd7c8677c507d72d93c Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Mon, 17 Aug 2020 10:03:55 +0200 Subject: tst_qqmlcomponent: Fix test failure Qml point type can be set with both QPoint and QPointF, but comes back always as QPointF (or rather QVariantQ(QPointF)). The new comparison does not perform conversions, so the test which did set comp.mypoint = mypoint and then compared comp.property("mypoint") == mypoint would fail, so we use use an explicit conversion when comparing. Change-Id: Ibf9dc8c5de7dd416939bd74966e970d939436550 Reviewed-by: Fabian Kosmale --- tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp') diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index 79014a4450..36c13bb705 100644 --- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -802,7 +802,7 @@ void tst_qqmlcomponent::testSetInitialProperties() COMPARE(myurl); COMPARE(myfont); COMPARE(mydate); - COMPARE(mypoint); + QCOMPARE(obj->property("mypoint"), QPointF(mypoint)); COMPARE(mysize); COMPARE(matrix); COMPARE(quat); -- cgit v1.2.3