diff options
author | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2020-08-17 10:03:55 +0200 |
---|---|---|
committer | Fawzi Mohamed <fawzi.mohamed@qt.io> | 2020-08-17 10:36:22 +0200 |
commit | 7a5987b360b63a479737edd7c8677c507d72d93c (patch) | |
tree | edc9cbec33d1af03198916f83e30b4a2b035acac | |
parent | 434dbf0e50804e4d2f107dd3c1bf6fae64614971 (diff) |
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 <fabian.kosmale@qt.io>
-rw-r--r-- | tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |