diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-10-05 15:59:47 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-10-08 08:58:28 +0000 |
commit | 759ec8419abab4433bf0d85c2414708fd664db82 (patch) | |
tree | dbe388dc2b20d81589bb26ce8daa9f0ce6d77cd5 /share | |
parent | 37c66211620ad37b61804adcc7ae0d8ed0d614be (diff) |
Fix usage of @VAR@ in info plist files
Fixes: QBS-1601
Change-Id: Iead18bf5fd25f965cf9f9748469f2469488eabc8
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/imports/qbs/DarwinTools/darwin-tools.js | 9 | ||||
-rw-r--r-- | share/qbs/modules/bundle/BundleModule.qbs | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js index 5f9076004..9b81310f0 100644 --- a/share/qbs/imports/qbs/DarwinTools/darwin-tools.js +++ b/share/qbs/imports/qbs/DarwinTools/darwin-tools.js @@ -166,7 +166,14 @@ var PropertyListVariableExpander = (function () { var syntax; var idx = -1; for (var i in syntaxes) { - var j = str.lastIndexOf(syntaxes[i].open); + var j; + // normal case - we search for the last occurrence to do a correct replacement + // for nested variables, e.g. ${VAR1_${VAR2}}. This doesn't work in case + // when start == end, e.g. @VAR@ - in that case we search from the start + if (syntaxes[i].open !== syntaxes[i].close) + j = str.lastIndexOf(syntaxes[i].open); + else + j = str.indexOf(syntaxes[i].open); if (j > idx) { syntax = syntaxes[i]; idx = j; diff --git a/share/qbs/modules/bundle/BundleModule.qbs b/share/qbs/modules/bundle/BundleModule.qbs index bf2555fa3..05e77c81b 100644 --- a/share/qbs/modules/bundle/BundleModule.qbs +++ b/share/qbs/modules/bundle/BundleModule.qbs @@ -187,7 +187,7 @@ Module { property bool _useXcodeBuildSpecs: true // false to use ONLY the qbs build specs - readonly property var extraEnv: ({ + property var extraEnv: ({ "PRODUCT_BUNDLE_IDENTIFIER": identifier }) |