From 677d336def1686d0d6d8f6d55bf8e2686ed27e07 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 31 May 2019 14:20:07 +0200 Subject: tst_qqmlecmascript: add expected warning Change-Id: I6b5cebb75ceeed6664a5d239ee8ce66b171f2667 Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp') diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index 72a524ece5..5ae9a6b038 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -8270,7 +8270,9 @@ void tst_qqmlecmascript::varPropertyAccessOnObjectWithInvalidContext() void tst_qqmlecmascript::importedScriptsAccessOnObjectWithInvalidContext() { QQmlEngine engine; - QQmlComponent component(&engine, testFileUrl("importedScriptsAccessOnObjectWithInvalidContext.qml")); + const QUrl url = testFileUrl("importedScriptsAccessOnObjectWithInvalidContext.qml"); + QTest::ignoreMessage(QtWarningMsg, qPrintable(url.toString() + ":29: TypeError: Cannot read property 'Foo' of null")); + QQmlComponent component(&engine, url); QScopedPointer obj(component.create()); if (obj.isNull()) qDebug() << component.errors().first().toString(); -- cgit v1.2.3