From a4ee7adad7c8cf116e504a49142a72bfb4c8acf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Fri, 5 Jul 2019 12:55:12 +0200 Subject: Make sure urlInteceptor() works standalone It called QQmlEngine::setImportPathList() which removed E:/dev/qt-5d/qtbase/qml from the import path, which again caused it to fail loading because it could not find QtQml module. It worked by accident since other tests before it (such as qtqmlModule) already had QtQml loaded. Change-Id: Ife94fe0c6d5cf612350dd782b12648dcea42608a Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/qml/qqmlengine/tst_qqmlengine.cpp') diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp index a8c6248a47..e55cd6f7a0 100644 --- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp +++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp @@ -835,7 +835,7 @@ void tst_qqmlengine::urlInterceptor() QFETCH(QString, expectedAbsoluteUrl); QQmlEngine e; - e.setImportPathList(QStringList() << testFileUrl("interception/imports").toLocalFile()); + e.addImportPath(testFileUrl("interception/imports").toLocalFile()); CustomSelector cs(testFileUrl("")); cs.m_interceptionPoints = interceptionPoint; e.setUrlInterceptor(&cs); -- cgit v1.2.3