aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/module-providers
diff options
context:
space:
mode:
Diffstat (limited to 'share/qbs/module-providers')
-rw-r--r--share/qbs/module-providers/Qt/templates/android_support.qbs14
-rw-r--r--share/qbs/module-providers/Qt/templates/dbus.js1
-rw-r--r--share/qbs/module-providers/Qt/templates/plugin_support.qbs2
-rw-r--r--share/qbs/module-providers/Qt/templates/quick.js6
-rw-r--r--share/qbs/module-providers/Qt/templates/quick.qbs4
5 files changed, 17 insertions, 10 deletions
diff --git a/share/qbs/module-providers/Qt/templates/android_support.qbs b/share/qbs/module-providers/Qt/templates/android_support.qbs
index 3790037f3..87c980448 100644
--- a/share/qbs/module-providers/Qt/templates/android_support.qbs
+++ b/share/qbs/module-providers/Qt/templates/android_support.qbs
@@ -38,7 +38,7 @@ Module {
Depends { name: "Android.sdk"; condition: _enableSdkSupport }
Depends { name: "Android.ndk"; condition: _enableNdkSupport }
Depends { name: "java"; condition: _enableSdkSupport }
- Depends { name: "cpp" }
+ Depends { name: "cpp"; condition: _enableNdkSupport }
Properties {
condition: _enableNdkSupport && qbs.toolchain.contains("clang")
@@ -62,8 +62,10 @@ Module {
condition: _enableSdkSupport && Utilities.versionCompare(version, "6.0") >= 0
java.additionalClassPaths: [FileInfo.joinPaths(_qtInstallDir, "jar", "Qt6Android.jar")]
}
+ // "ANDROID_HAS_WSTRING" was removed from qtcore qstring.h in Qt 5.14.0
Properties {
- condition: _enableNdkSupport && (Android.ndk.abi === "armeabi-v7a" || Android.ndk.abi === "x86")
+ condition: _enableNdkSupport && Utilities.versionCompare(version, "5.14.0") < 0 &&
+ (Android.ndk.abi === "armeabi-v7a" || Android.ndk.abi === "x86")
cpp.defines: "ANDROID_HAS_WSTRING"
}
Properties {
@@ -78,7 +80,11 @@ Module {
condition: _enableSdkSupport && Utilities.versionCompare(version, "6.0") >= 0
Android.sdk.minimumVersion: "23"
}
- cpp.archSuffix: _multiAbi ? "_" + Android.ndk.abi : ""
+
+ Properties {
+ condition: _enableNdkSupport
+ cpp.archSuffix: _multiAbi ? "_" + Android.ndk.abi : ""
+ }
Rule {
condition: _enableSdkSupport
@@ -191,7 +197,7 @@ Module {
var prefixDirs = product.Qt.android_support.extraPrefixDirs;
if (prefixDirs && prefixDirs.length > 0)
f.writeLine('"extraPrefixDirs": ' + JSON.stringify(prefixDirs) + ',');
- if (Array.isArray(product.qmlImportPaths) && product.qmlImportPaths.length > 0)
+ 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/share/qbs/module-providers/Qt/templates/dbus.js b/share/qbs/module-providers/Qt/templates/dbus.js
index 0674bf684..3cdd6fb90 100644
--- a/share/qbs/module-providers/Qt/templates/dbus.js
+++ b/share/qbs/module-providers/Qt/templates/dbus.js
@@ -29,6 +29,7 @@
****************************************************************************/
var FileInfo = require("qbs.FileInfo");
+var ModUtils = require("qbs.ModUtils");
function outputFileName(input, suffix)
{
diff --git a/share/qbs/module-providers/Qt/templates/plugin_support.qbs b/share/qbs/module-providers/Qt/templates/plugin_support.qbs
index 1de923f17..19a739589 100644
--- a/share/qbs/module-providers/Qt/templates/plugin_support.qbs
+++ b/share/qbs/module-providers/Qt/templates/plugin_support.qbs
@@ -32,7 +32,7 @@ Module {
newValue = [];
else if (typeof newValue == "string")
newValue = [newValue];
- if (!Array.isArray(newValue))
+ if (!newValue instanceof Array)
throw "Invalid value '" + newValue + "' in Qt.plugin_support.pluginsByType";
eppt[pluginType] = (eppt[pluginType] || []).uniqueConcat(newValue);
}
diff --git a/share/qbs/module-providers/Qt/templates/quick.js b/share/qbs/module-providers/Qt/templates/quick.js
index 4f3da2fb0..76f2e9e53 100644
--- a/share/qbs/module-providers/Qt/templates/quick.js
+++ b/share/qbs/module-providers/Qt/templates/quick.js
@@ -31,7 +31,7 @@
var FileInfo = require("qbs.FileInfo");
var Process = require("qbs.Process");
-function scanQrc(qrcFilePath) {
+function scanQrc(product, qrcFilePath) {
var absInputDir = FileInfo.path(qrcFilePath);
var result = [];
var process = new Process();
@@ -65,8 +65,8 @@ function qtQuickResourceFileOutputName(fileName) {
return fileName.replace(/\.qrc$/, "_qtquickcompiler.qrc");
}
-function contentFromQrc(qrcFilePath) {
- var filesInQrc = scanQrc(qrcFilePath);
+function contentFromQrc(product, qrcFilePath) {
+ var filesInQrc = scanQrc(product, qrcFilePath);
var qmlJsFiles = filesInQrc.filter(function (filePath) {
return (/\.(js|qml)$/).test(filePath);
} );
diff --git a/share/qbs/module-providers/Qt/templates/quick.qbs b/share/qbs/module-providers/Qt/templates/quick.qbs
index bf04fe869..ac3ab5b26 100644
--- a/share/qbs/module-providers/Qt/templates/quick.qbs
+++ b/share/qbs/module-providers/Qt/templates/quick.qbs
@@ -79,7 +79,7 @@ QtModule {
condition: useCompiler
inputs: 'qt.quick.qrc'
searchPaths: [FileInfo.path(input.filePath)]
- scan: QC.scanQrc(input.filePath)
+ scan: QC.scanQrc(product, input.filePath)
}
FileTagger {
@@ -100,7 +100,7 @@ QtModule {
var cmd = new JavaScriptCommand();
cmd.silent = true;
cmd.sourceCode = function() {
- var content = QC.contentFromQrc(input.filePath);
+ var content = QC.contentFromQrc(product, input.filePath);
content.qrcFilePath = input.filePath;
var tf = new TextFile(output.filePath, TextFile.WriteOnly);