summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2020-11-19 10:33:33 +0200
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2020-11-19 13:28:46 +0200
commit4ef3da04c3390f02bcb0507128372e6a299dc8fd (patch)
tree9eec30743dd9fb8cdc6dc52d3f48492b0984caa4 /src/tools
parent456699da93323ca3ad56ca8f16aa3197dec380e6 (diff)
Android: use extraPrefixDirs with qmlimportscanner
This will ensure that qmlimportscanner can use the extraPrefixDirs, when an extra prefix is provided like the case with Conan builds. Task-number: QTBUG-88519 Change-Id: Idec3916b043822da094973a7e246a6ee4af14c83 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/androiddeployqt/main.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 1b29fe7381..016db897be 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -1827,8 +1827,18 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
importPaths += shellQuote(options->qtInstallDirectory + QLatin1String("/qml"));
if (!rootPath.isEmpty())
importPaths += shellQuote(rootPath);
- for (const QString &qmlImportPath : qAsConst(options->qmlImportPaths))
- importPaths += shellQuote(qmlImportPath);
+ for (const QString &prefix : options->extraPrefixDirs)
+ if (QDir().exists(prefix + QLatin1String("/qml")))
+ importPaths += shellQuote(prefix + QLatin1String("/qml"));
+
+ for (const QString &qmlImportPath : qAsConst(options->qmlImportPaths)) {
+ if (QDir().exists(qmlImportPath)) {
+ importPaths += shellQuote(qmlImportPath);
+ } else {
+ fprintf(stderr, "Warning: QML import path %s does not exist.\n",
+ qPrintable(qmlImportPath));
+ }
+ }
qmlImportScanner += QLatin1String(" -importPath %1").arg(importPaths.join(QLatin1Char(' ')));
if (options->verbose) {