aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsengine
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-10 10:33:49 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-08-28 13:49:11 +0200
commit2afed94c70913e018198422ef222c9168326d09c (patch)
tree526952d291b70065886377e540f9e149be2f1537 /tests/auto/qml/qjsengine
parent6e423233b2e419fc3d7fc30bebcad976dca31934 (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/auto/qml/qjsengine')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp2
1 files changed, 1 insertions, 1 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);
}