diff options
Diffstat (limited to 'tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp')
-rw-r--r-- | tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp index 66ddb392f9..801707f2ec 100644 --- a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp +++ b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp @@ -115,7 +115,10 @@ void tst_QQuickWorkerScript::messaging() waitForEchoMessage(worker); const QMetaObject *mo = worker->metaObject(); - QCOMPARE(mo->property(mo->indexOfProperty("response")).read(worker).value<QVariant>(), value); + QVariant response = mo->property(mo->indexOfProperty("response")).read(worker).value<QVariant>(); + if (response.userType() == qMetaTypeId<QJSValue>()) + response = response.value<QJSValue>().toVariant(); + QCOMPARE(response, value); qApp->processEvents(); delete worker; |