aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Blackquill <uhhadd@gmail.com>2022-01-20 18:36:15 -0500
committerJan Blackquill <uhhadd@gmail.com>2022-02-03 22:14:36 +0000
commit38757a783a5a89f35a12184e77550017ee52d32e (patch)
tree277075b04e80525579049fbc8865ae03773e4ee2
parent2ab8aa4bf0600b100e83d02320a905a257a1e7d6 (diff)
Add qmlImportPaths property to Qt.android_support
Change-Id: I3fd73b5053562b139324d3a473184e9c520c2587 Reviewed-by: Raphaƫl Cotty <raphael.cotty@gmail.com> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r--doc/reference/modules/qt-android_support-module.qdoc9
-rw-r--r--share/qbs/module-providers/Qt/templates/android_support.qbs6
-rw-r--r--tests/auto/blackbox/testdata-android/qml-app/qml-app.qbs2
3 files changed, 15 insertions, 2 deletions
diff --git a/doc/reference/modules/qt-android_support-module.qdoc b/doc/reference/modules/qt-android_support-module.qdoc
index f8f8368c5..01d43ab98 100644
--- a/doc/reference/modules/qt-android_support-module.qdoc
+++ b/doc/reference/modules/qt-android_support-module.qdoc
@@ -74,6 +74,15 @@
*/
/*!
+ \qmlproperty stringList Qt.android_support::qmlImportPaths
+
+ Additional directories to search for QML imports.
+
+ \defaultvalue \c undefined
+ \since 1.22
+*/
+
+/*!
\qmlproperty bool Qt.android_support::verboseAndroidDeployQt
Enable this property if you want verbose output from the
diff --git a/share/qbs/module-providers/Qt/templates/android_support.qbs b/share/qbs/module-providers/Qt/templates/android_support.qbs
index df8c60427..ed69e7691 100644
--- a/share/qbs/module-providers/Qt/templates/android_support.qbs
+++ b/share/qbs/module-providers/Qt/templates/android_support.qbs
@@ -10,6 +10,7 @@ Module {
version: @version@
property string qmlRootDir: product.sourceDirectory
property stringList extraPrefixDirs
+ property stringList qmlImportPaths
property stringList deploymentDependencies // qmake: ANDROID_DEPLOYMENT_DEPENDENCIES
property stringList extraPlugins // qmake: ANDROID_EXTRA_PLUGINS
property stringList extraLibs // qmake: ANDROID_EXTRA_LIBS
@@ -195,7 +196,10 @@ Module {
var prefixDirs = product.Qt.android_support.extraPrefixDirs;
if (prefixDirs && prefixDirs.length > 0)
f.writeLine('"extraPrefixDirs": ' + JSON.stringify(prefixDirs) + ',');
- if ((product.qmlImportPaths instanceof Array) && product.qmlImportPaths.length > 0)
+ var qmlImportPaths = product.Qt.android_support.qmlImportPaths;
+ if (qmlImportPaths && qmlImportPaths.length > 0)
+ f.writeLine('"qml-import-paths": "' + qmlImportPaths.join(',') + '",');
+ else if ((product.qmlImportPaths instanceof Array) && product.qmlImportPaths.length > 0)
f.writeLine('"qml-import-paths": "' + product.qmlImportPaths.join(',') + '",');
if (Utilities.versionCompare(product.Qt.android_support.version, "6.0") >= 0) {
diff --git a/tests/auto/blackbox/testdata-android/qml-app/qml-app.qbs b/tests/auto/blackbox/testdata-android/qml-app/qml-app.qbs
index e91a14902..472f1b657 100644
--- a/tests/auto/blackbox/testdata-android/qml-app/qml-app.qbs
+++ b/tests/auto/blackbox/testdata-android/qml-app/qml-app.qbs
@@ -8,7 +8,7 @@ QtApplication {
}
Android.sdk.packageName: "my.qmlapp"
Android.sdk.apkBaseName: name
- property stringList qmlImportPaths: path
+ Qt.android_support.qmlImportPaths: path
files: [
"main.cpp",
"qml.qrc",