diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2019-07-05 12:55:12 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2019-07-05 13:24:45 +0200 |
commit | a4ee7adad7c8cf116e504a49142a72bfb4c8acf3 (patch) | |
tree | 4c9ebb7a2cc3cc3a129fd1e1ddd33adc0b6f7415 /tests | |
parent | e1a8d95e8e31af214121b38faa6d8a69ada8ea9b (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |