aboutsummaryrefslogtreecommitdiffstats
path: root/qbs
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2023-07-24 16:14:26 +0200
committerEike Ziller <eike.ziller@qt.io>2023-07-25 13:21:16 +0000
commita419670ff5384ed16f4ae00b3da497792931a771 (patch)
treeeaa01772f1f5e98d2f92257ed62586ee702986ec /qbs
parentb11a6900e601e605475e94f46e2f5d85ba22a2df (diff)
Build: Change plugin json.in files to CMake style
They were still using variables in qmake style. Directly use CMake variables in the json.in files and remove the no longer needed escaping of quotes. Adds a fatal message if it detects the old style in a .json.in file for easier porting. Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'qbs')
-rw-r--r--qbs/modules/pluginjson/pluginjson.qbs12
1 files changed, 5 insertions, 7 deletions
diff --git a/qbs/modules/pluginjson/pluginjson.qbs b/qbs/modules/pluginjson/pluginjson.qbs
index e210731f0b..f52158c965 100644
--- a/qbs/modules/pluginjson/pluginjson.qbs
+++ b/qbs/modules/pluginjson/pluginjson.qbs
@@ -72,17 +72,15 @@ Module {
var vars = pluginJsonReplacements || {};
var inf = new TextFile(input.filePath);
var all = inf.readAll();
- // replace quoted quotes
- all = all.replace(/\\\"/g, '"');
// replace config vars
var qtcVersion = product.moduleProperty("qtc", "qtcreator_version");
- vars['QTCREATOR_VERSION'] = qtcVersion;
- vars['QTCREATOR_COMPAT_VERSION']
+ vars['IDE_VERSION'] = qtcVersion;
+ vars['IDE_VERSION_COMPAT']
= product.moduleProperty("qtc", "qtcreator_compat_version");
vars['IDE_VERSION_MAJOR'] = product.moduleProperty("qtc", "ide_version_major");
vars['IDE_VERSION_MINOR'] = product.moduleProperty("qtc", "ide_version_minor");
vars['IDE_VERSION_RELEASE'] = product.moduleProperty("qtc", "ide_version_release");
- vars['QTCREATOR_COPYRIGHT_YEAR']
+ vars['IDE_COPYRIGHT_YEAR']
= product.moduleProperty("qtc", "qtcreator_copyright_year")
if (!vars['QTC_PLUGIN_REVISION'])
vars['QTC_PLUGIN_REVISION'] = product.vcs ? (product.vcs.repoState || "") : "";
@@ -97,9 +95,9 @@ Module {
deplist.push(" { \"Name\" : \"" + plugin_test_depends[i] + "\", \"Version\" : \"" + qtcVersion + "\", \"Type\" : \"test\" }");
}
deplist = deplist.join(",\n")
- vars['dependencyList'] = "\"Dependencies\" : [\n" + deplist + "\n ]";
+ vars['IDE_PLUGIN_DEPENDENCIES'] = "\"Dependencies\" : [\n" + deplist + "\n ]";
for (i in vars) {
- all = all.replace(new RegExp('\\\$\\\$' + i + '(?!\w)', 'g'), vars[i]);
+ all = all.replace(new RegExp('\\\$\\{' + i + '(?!\w)\\}', 'g'), vars[i]);
}
var file = new TextFile(output.filePath, TextFile.WriteOnly);
file.truncate();