diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-08-23 17:06:41 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-08-23 19:27:37 +0200 |
commit | 098b8e712a2cabbbf8f47bcead73050588b5050c (patch) | |
tree | e205ee8b0a06e15900d04e13fcb4d3240fe4440d /tests/auto/quick | |
parent | 8b8cfb6a8eecd860f50f3bbbd452de91832a180c (diff) |
tst_qquickaccessible: Adapt to QVariant::isNull change
isNull does not cascade anymore to its contained type's isNull function.
Thus, adjust the test to check string emptiness in a saner way.
Change-Id: Ia7376010e8a13dcaa5ddc9328525c0771d032ebc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r-- | tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp index 0e6c3b3ad9..2d7c374419 100644 --- a/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp +++ b/tests/auto/quick/qquickaccessible/tst_qquickaccessible.cpp @@ -206,9 +206,11 @@ void tst_QQuickAccessible::quickAttachedProperties() QCOMPARE(p.isNull(), false); QCOMPARE(p.toInt(), int(QAccessible::PushButton)); p = attachedObject->property("name"); - QCOMPARE(p.isNull(), true); + QCOMPARE(p.type(), QMetaType::QString); + QVERIFY2(p.value<QString>().isEmpty(), QTest::toString(p)); p = attachedObject->property("description"); - QCOMPARE(p.isNull(), true); + QCOMPARE(p.type(), QMetaType::QString); + QVERIFY2(p.value<QString>().isEmpty(), QTest::toString(p)); QCOMPARE(attachedObject->wasNameExplicitlySet(), false); } delete object; |