diff options
-rw-r--r-- | src/tools/androiddeployqt/main.cpp | 14 |
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) { |