summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Dippold <michael.dippold@us.thalesgroup.com>2019-12-04 14:48:00 -0800
committerMichael Dippold <michael.dippold@us.thalesgroup.com>2019-12-11 11:14:47 -0800
commit3162345670ffe67a71a62abaeda0d8eb8ad0682e (patch)
tree6efbc3ab8183a4cc9cd3fca4a8ac3d4ce394a6e1 /src
parentc15d6a155c6121bad68a3ec60be62181fb92d0f8 (diff)
Support both qrc and qml files for qmlimportscanner
Some projects can be configured to have both qrcFiles and qml-root-path included in the deployment settings file. The addition to qrc scanning prevented the qml root directory from being scanned. Change-Id: Idadb62f5572be45d0083294440bdb29740c2c47e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/tools/androiddeployqt/main.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp
index 550ed0832f..6fd32c2d29 100644
--- a/src/tools/androiddeployqt/main.cpp
+++ b/src/tools/androiddeployqt/main.cpp
@@ -1717,17 +1717,18 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies)
qmlImportScanner += QLatin1String(" -qrcFiles");
for (const QString &qrcFile : options->qrcFiles)
qmlImportScanner += QLatin1Char(' ') + shellQuote(qrcFile);
- } else {
- if (rootPath.isEmpty())
- rootPath = QFileInfo(options->inputFileName).absolutePath();
- else
- rootPath = QFileInfo(rootPath).absoluteFilePath();
-
- if (!rootPath.endsWith(QLatin1Char('/')))
- rootPath += QLatin1Char('/');
- qmlImportScanner += QLatin1String(" -rootPath %1").arg(shellQuote(rootPath));
}
+ if (rootPath.isEmpty())
+ rootPath = QFileInfo(options->inputFileName).absolutePath();
+ else
+ rootPath = QFileInfo(rootPath).absoluteFilePath();
+
+ if (!rootPath.endsWith(QLatin1Char('/')))
+ rootPath += QLatin1Char('/');
+
+ qmlImportScanner += QLatin1String(" -rootPath %1").arg(shellQuote(rootPath));
+
QStringList importPaths;
importPaths += shellQuote(options->qtInstallDirectory + QLatin1String("/qml"));
if (!rootPath.isEmpty())