aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsvalue
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-13 01:03:07 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2020-02-13 13:09:47 +0100
commitd5a5e9dcd594e2d2f3dbb05fdb0baf56cc50774d (patch)
tree4c6979394422c97dc21bc8b6e7852e1998eafb25 /tests/auto/qml/qjsvalue
parent229e3220ef521dd4389808fd311ea5ae33ab0cae (diff)
parentac0ce38dcfeeded87db0c1dd5d348f5ed6fc1af3 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: src/qml/jsruntime/qv4engine.cpp Change-Id: I61f41672e2dfe7e542ca30fed5f173d0a9ee3412
Diffstat (limited to 'tests/auto/qml/qjsvalue')
-rw-r--r--tests/auto/qml/qjsvalue/tst_qjsvalue.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp
index d6e85f973f..b561e5f398 100644
--- a/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp
+++ b/tests/auto/qml/qjsvalue/tst_qjsvalue.cpp
@@ -1128,6 +1128,10 @@ void tst_QJSValue::toVariant()
// array
{
+ auto handler = qInstallMessageHandler([](QtMsgType type, const QMessageLogContext &, const QString &) {
+ if (type == QtMsgType::QtWarningMsg)
+ QFAIL("Converting QJSValue to QVariant should not cause error messages");
+ });
QVariantList listIn;
listIn << 123 << "hello";
QJSValue array = eng.toScriptValue(listIn);
@@ -1145,8 +1149,9 @@ void tst_QJSValue::toVariant()
QCOMPARE(array2.property("length").toInt(), array.property("length").toInt());
for (int i = 0; i < array.property("length").toInt(); ++i)
QVERIFY(array2.property(i).strictlyEquals(array.property(i)));
- }
+ qInstallMessageHandler(handler);
+ }
}
void tst_QJSValue::toQObject_nonQObject_data()