diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-07-10 10:33:49 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-08-28 13:49:11 +0200 |
commit | 2afed94c70913e018198422ef222c9168326d09c (patch) | |
tree | 526952d291b70065886377e540f9e149be2f1537 /tests | |
parent | 6e423233b2e419fc3d7fc30bebcad976dca31934 (diff) |
Fix QtQml after QMetaType/QVariant changes in Qt Core
Change-Id: I2a983cf8188e88d80d3b7726208d821427eb8f3c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index cd03903da2..81e150bf1f 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -563,7 +563,7 @@ void tst_QJSEngine::toScriptValue() if (input.metaType().id() == QMetaType::QChar) { if (!input.convert(QMetaType::QString)) QFAIL("cannot convert to the original value"); - } else if (!output.convert(input.metaType().id())) + } else if (!output.convert(input.metaType().id()) && input.isValid()) QFAIL("cannot convert to the original value"); QCOMPARE(input, output); } diff --git a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index 48613d04f1..c0f74b3ec0 100644 --- a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -98,7 +98,6 @@ void tst_qqmlconsole::logging() QStringList stringList; stringList << QStringLiteral("Hello") << QStringLiteral("World"); CustomObject customObject; - QVERIFY(QMetaType::registerDebugStreamOperator<CustomObject>()); QQmlComponent component(&engine, testUrl); QScopedPointer<QObject> object(component.createWithInitialProperties({ |