From 3162345670ffe67a71a62abaeda0d8eb8ad0682e Mon Sep 17 00:00:00 2001 From: Michael Dippold Date: Wed, 4 Dec 2019 14:48:00 -0800 Subject: 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 --- src/tools/androiddeployqt/main.cpp | 19 ++++++++++--------- 1 file 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 *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()) -- cgit v1.2.3