diff options
author | Alexey Edelev <[email protected]> | 2022-10-04 17:12:39 +0200 |
---|---|---|
committer | Alexey Edelev <[email protected]> | 2022-10-31 15:39:14 +0200 |
commit | 720d5cc1a47ad0702d51548009bdcf229368d6fc (patch) | |
tree | 6e105a2950d5d4cb63cf4bd371b0f821cf758dbd /src/tools/androiddeployqt/main.cpp | |
parent | 062efb305e1866482c03717ed1cf9717f45e5abb (diff) |
Add flag that skips Qml import scanning to android deployment settings
If Qml module is not found it doesn't make sense to run any
functionality that is related to Qml inside androiddeployqt. Add the
deployment setting option that indicates this explicitly and set it
to true when Qml module is not found by CMake or by qmake.
Task-number: QTBUG-106939
Pick-to: 6.4 6.2
Change-Id: I1e6cffbdd230007feffe7448617097c10238a6c9
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Assam Boudjelthia <[email protected]>
Diffstat (limited to 'src/tools/androiddeployqt/main.cpp')
-rw-r--r-- | src/tools/androiddeployqt/main.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index fa8f7018b25..20b5c4dd376 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -218,6 +218,7 @@ struct Options // Override qml import scanner path QString qmlImportScannerBinaryPath; + bool qmlSkipImportScanning = false; }; static const QHash<QByteArray, QByteArray> elfArchitectures = { @@ -1036,6 +1037,12 @@ bool readInputFile(Options *options) } { + const QJsonValue qmlSkipImportScanning = jsonObject.value("qml-skip-import-scanning"_L1); + if (!qmlSkipImportScanning.isUndefined()) + options->qmlSkipImportScanning = qmlSkipImportScanning.toBool(); + } + + { const QJsonValue extraPlugins = jsonObject.value("android-extra-plugins"_L1); if (!extraPlugins.isUndefined()) options->extraPlugins = extraPlugins.toString().split(u','); @@ -2302,11 +2309,10 @@ bool readDependencies(Options *options) } } - if ((!options->rootPaths.empty() || !options->qrcFiles.isEmpty()) && - !scanImports(options, &usedDependencies)) - return false; - - return true; + if (options->qmlSkipImportScanning + || (options->rootPaths.empty() && options->qrcFiles.isEmpty())) + return true; + return scanImports(options, &usedDependencies); } bool containsApplicationBinary(Options *options) |