mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
qt5, qt6: fix QML path search order
QQmlImportDatabase::addImportPath _prepends_ to the search path, so our version specific search paths need to be added in last.
This commit is contained in:
parent
631f14c407
commit
e44cf032bc
@ -1,5 +1,5 @@
|
||||
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
|
||||
index 289f11d006..80c422403c 100644
|
||||
index 289f11d006..9b0a48c6c7 100644
|
||||
--- a/src/qml/qml/qqmlimport.cpp
|
||||
+++ b/src/qml/qml/qqmlimport.cpp
|
||||
@@ -1897,17 +1897,22 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
||||
@ -26,8 +26,8 @@ index 289f11d006..80c422403c 100644
|
||||
+ }
|
||||
+ };
|
||||
+
|
||||
+ addEnvImportPath("NIXPKGS_QT5_QML_IMPORT_PATH");
|
||||
+ addEnvImportPath("QML2_IMPORT_PATH");
|
||||
+ addEnvImportPath("NIXPKGS_QT5_QML_IMPORT_PATH");
|
||||
|
||||
addImportPath(QStringLiteral("qrc:/qt-project.org/imports"));
|
||||
addImportPath(QCoreApplication::applicationDirPath());
|
||||
|
@ -1,12 +1,12 @@
|
||||
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
|
||||
index a7d1a3f77f..aac7392d4f 100644
|
||||
index 2e482c220d..4873809bec 100644
|
||||
--- a/src/qml/qml/qqmlimport.cpp
|
||||
+++ b/src/qml/qml/qqmlimport.cpp
|
||||
@@ -1515,6 +1515,7 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
||||
};
|
||||
|
||||
@@ -1517,6 +1517,7 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
||||
// env import paths
|
||||
+ addEnvImportPath("NIXPKGS_QT6_QML_IMPORT_PATH");
|
||||
addEnvImportPath("QML_IMPORT_PATH");
|
||||
addEnvImportPath("QML2_IMPORT_PATH");
|
||||
+ addEnvImportPath("NIXPKGS_QT6_QML_IMPORT_PATH");
|
||||
|
||||
addImportPath(QStringLiteral("qrc:/qt/qml"));
|
||||
addImportPath(QStringLiteral("qrc:/qt-project.org/imports"));
|
||||
|
Loading…
Reference in New Issue
Block a user