From caa0a639e7878f031a2059c86447529c077fbce0 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 15 Dec 2015 13:50:29 +0100 Subject: Rearrange the import paths so the qrc one is after the application path By moving the qrc import path to be after the application one we ensure that when the application starts up it will look for the imports in the same way as it would both on deployment and development machine. This is particularly important when building Qt statically because it should be looking for the imports inside the resources. Change-Id: I81f1b7e96c0f9df3671249668accad7adfd00df4 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlimport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlimport.cpp') diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 76a367c5c8..de1e8722fe 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1563,7 +1563,6 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) : engine(e) { filePluginPath << QLatin1String("."); - addImportPath(QStringLiteral("qrc:/qt-project.org/imports")); // Search order is applicationDirPath(), qrc:/qt-project.org/imports, $QML2_IMPORT_PATH, QLibraryInfo::Qml2ImportsPath QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); @@ -1582,6 +1581,7 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) addImportPath(paths.at(ii)); } + addImportPath(QStringLiteral("qrc:/qt-project.org/imports")); addImportPath(QCoreApplication::applicationDirPath()); } -- cgit v1.2.3