aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlimport
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-02-07 16:22:53 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-03-17 14:44:26 +0100
commitf4937a21b61bf2f214d175d77c432c68f25ead21 (patch)
treea9753103192cf6310913ed3127bf48d80aed8462 /tests/auto/qml/qqmlimport
parent1eb20d70619cc896fc283bd6605b257a8750c518 (diff)
Allow multiple URL interceptors per engine
We may want to have, for example, a QQmlFileSelector and a component-specific interceptor that chooses a theme or similar. Also, make the API public. We want to propose this as alternative to dynamically registering QML files via qmlRegisterType(QUrl, ...). Change-Id: I4a535d3ea556da6710fde816579ec188b3f57099 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlimport')
-rw-r--r--tests/auto/qml/qqmlimport/tst_qqmlimport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
index e332d86338..d5d2b061e9 100644
--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp
@@ -233,7 +233,7 @@ void tst_QQmlImport::interceptQmldir()
{
QQmlEngine engine;
QmldirUrlInterceptor interceptor;
- engine.setUrlInterceptor(&interceptor);
+ engine.addUrlInterceptor(&interceptor);
QQmlComponent component(&engine);
component.loadUrl(testFileUrl("interceptQmldir.qml"));