summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/macdeployqt/shared')
-rw-r--r--src/macdeployqt/shared/shared.cpp7
-rw-r--r--src/macdeployqt/shared/shared.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index 33d29ecc2..a6ff37ea0 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -1216,11 +1216,12 @@ static bool importLessThan(const QVariant &v1, const QVariant &v2)
}
// Scan qml files in qmldirs for import statements, deploy used imports from Qml2ImportsPath to Contents/Resources/qml.
-bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, QStringList &qmlDirs)
+bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, QStringList &qmlDirs, QStringList &qmlImportPaths)
{
LogNormal() << "";
LogNormal() << "Deploying QML imports ";
- LogNormal() << "Application QML file search path(s) is" << qmlDirs;
+ LogNormal() << "Application QML file path(s) is" << qmlDirs;
+ LogNormal() << "QML module search path(s) is" << qmlImportPaths;
// Use qmlimportscanner from QLibraryInfo::BinariesPath
QString qmlImportScannerPath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlimportscanner");
@@ -1243,6 +1244,8 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
argumentList.append("-rootPath");
argumentList.append(qmlDir);
}
+ for (const QString &importPath : qmlImportPaths)
+ argumentList << "-importPath" << importPath;
QString qmlImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
argumentList.append( "-importPath");
argumentList.append(qmlImportsPath);
diff --git a/src/macdeployqt/shared/shared.h b/src/macdeployqt/shared/shared.h
index 588b5dd62..ab28360d5 100644
--- a/src/macdeployqt/shared/shared.h
+++ b/src/macdeployqt/shared/shared.h
@@ -124,7 +124,7 @@ DeploymentInfo deployQtFrameworks(const QString &appBundlePath, const QStringLis
DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks,const QString &bundlePath, const QStringList &binaryPaths, bool useDebugLibs, bool useLoaderPath);
void createQtConf(const QString &appBundlePath);
void deployPlugins(const QString &appBundlePath, DeploymentInfo deploymentInfo, bool useDebugLibs);
-bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, QStringList &qmlDirs);
+bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, QStringList &qmlDirs, QStringList &qmlImportPaths);
void changeIdentification(const QString &id, const QString &binaryPath);
void changeInstallName(const QString &oldName, const QString &newName, const QString &binaryPath);
void runStrip(const QString &binaryPath);