diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-12-15 13:50:29 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-12-17 15:08:24 +0000 |
commit | caa0a639e7878f031a2059c86447529c077fbce0 (patch) | |
tree | 29615ee57f80cae43610e75b65eed977bedfa532 /src/qml/qml/qqmlimport.cpp | |
parent | 142b97ce92c6b7d9ef9c5febebf748ea79ea4eea (diff) |
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 <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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()); } |