mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 05:25:38 +00:00
fe0ab944db
The module definitions are factored out and shared between qt56 and qt59. The symlink farm which was created during builds is no longer needed.
21 lines
918 B
Diff
21 lines
918 B
Diff
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
|
|
index dfdf2edbe..7ee96049d 100644
|
|
--- a/src/qml/qml/qqmlimport.cpp
|
|
+++ b/src/qml/qml/qqmlimport.cpp
|
|
@@ -1568,6 +1568,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
|
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
|
addImportPath(installImportsPath);
|
|
|
|
+ // Add import paths derived from PATH
|
|
+ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
|
|
+ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX);
|
|
+ for (const QString &path: paths) {
|
|
+ if (!path.isEmpty()) {
|
|
+ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir));
|
|
+ }
|
|
+ }
|
|
+
|
|
// env import paths
|
|
if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) {
|
|
const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
|