1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Nick Cao <nickcao@nichi.co>
3 Date: Tue, 10 Oct 2023 10:12:56 -0400
4 Subject: [PATCH] qtbase: pass to qmlimportscanner the QML2_IMPORT_PATH
7 src/tools/macdeployqt/shared/shared.cpp | 7 +++++++
8 1 file changed, 7 insertions(+)
10 diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
11 index b7ee93f6fc1..57b68627eba 100644
12 --- a/src/tools/macdeployqt/shared/shared.cpp
13 +++ b/src/tools/macdeployqt/shared/shared.cpp
14 @@ -1300,6 +1300,13 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
15 argumentList.append( "-importPath");
16 argumentList.append(qmlImportsPath);
18 + // In a modularized installation of qt as we have in Nix, instead, we will
19 + // read the paths from the environment, as they are spread in multiple
20 + // locations and normally set in the environment like this
21 + auto envQmlImportPaths = ::qgetenv("QML2_IMPORT_PATH").split(':');
22 + for (const QString &importPath : envQmlImportPaths)
23 + argumentList << "-importPath" << importPath;
25 // run qmlimportscanner
26 QProcess qmlImportScanner;
27 qmlImportScanner.start(qmlImportScannerPath, argumentList);