diff options
author | David Skoland <david.skoland@qt.io> | 2020-11-03 18:48:13 +0100 |
---|---|---|
committer | David Skoland <david.skoland@qt.io> | 2020-11-04 11:12:25 +0100 |
commit | 89ee1a33cb373709af9de565902e97c0299d3bee (patch) | |
tree | 1f37375d0360cc9032e4825293537b16ccf1457a /tests/auto/qml/debugger | |
parent | 8ae632bbbc12f9751c8a55692687aff73ca01d77 (diff) |
Update MetaType things in tests
Also fix some minute errors.
Change-Id: I1815224a6efdd7e619dfe5a5911d8b1166a3b3c8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/qml/debugger')
-rw-r--r-- | tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp index 9bef2185de..a87a77180f 100644 --- a/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp +++ b/tests/auto/qml/debugger/qqmlenginedebugservice/tst_qqmlenginedebugservice.cpp @@ -283,7 +283,7 @@ void tst_QQmlEngineDebugService::recursiveObjectTest( } else if (pmeta.userType() < QMetaType::User && pmeta.userType() != QMetaType::QVariant) { const QVariant expected = pmeta.read(o); QVariant value = p.value; - auto expectedType = expected.metaType().id(); + QMetaType expectedType = expected.metaType(); if (value != expected && p.value.canConvert(expectedType)) value.convert(expectedType); QVERIFY2(value == expected, QString::fromLatin1("%1 != %2. Details: %3/%4/%5/%6") @@ -778,8 +778,8 @@ void tst_QQmlEngineDebugService::queryObject() // test specific property values QCOMPARE(findProperty(rect.properties, "width").value, QVariant::fromValue(500)); QCOMPARE(findProperty(rect.properties, "height").value, QVariant::fromValue(600)); - auto expected = findProperty(rect.properties, "color").value; - expected.convert(QMetaType::fromType<QColor>().id()); + QVariant expected = findProperty(rect.properties, "color").value; + expected.convert(QMetaType::fromType<QColor>()); QCOMPARE(expected , QVariant::fromValue(QColor("blue"))); } else { foreach (const QQmlEngineDebugObjectReference &child, obj.children) { @@ -857,8 +857,8 @@ void tst_QQmlEngineDebugService::queryObjectsForLocation() // test specific property values QCOMPARE(findProperty(rect.properties, "width").value, QVariant::fromValue(500)); QCOMPARE(findProperty(rect.properties, "height").value, QVariant::fromValue(600)); - auto expected = findProperty(rect.properties, "color").value; - auto colorMetatype = QMetaType::fromType<QColor>().id(); + QVariant expected = findProperty(rect.properties, "color").value; + QMetaType colorMetatype = QMetaType::fromType<QColor>(); QVERIFY(expected.canConvert(colorMetatype)); expected.convert(colorMetatype); QCOMPARE(expected , QVariant::fromValue(QColor("blue"))); |