aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-02-05 18:02:58 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2018-02-12 15:35:11 +0000
commite62b98604634ff5a14ea74a118f3064339425b1d (patch)
treeaa3e71a43e3f8217111642cb5165e0615cb4c596 /src
parented8e49b64a30005e29a74656ce63a8c2cfcf5383 (diff)
Qt.scxml: Add support for the --statemethods option
Also add an undocumented property to add arbitrary options. This one acts as an emergency fallback in case we miss a new option in the future. Task-number: QBS-1295 Change-Id: I0ba81325d6975d8bb25cbd397c9daaaa12f685c2 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andreas Bacher <andreas.bacher@meon-medical.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/lib/qtprofilesetup/templates/scxml.qbs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/qtprofilesetup/templates/scxml.qbs b/src/lib/qtprofilesetup/templates/scxml.qbs
index 98c3bd30f..f40593637 100644
--- a/src/lib/qtprofilesetup/templates/scxml.qbs
+++ b/src/lib/qtprofilesetup/templates/scxml.qbs
@@ -1,5 +1,6 @@
import qbs 1.0
import qbs.FileInfo
+import qbs.Utilities
import "../QtModule.qbs" as QtModule
QtModule {
@@ -8,6 +9,8 @@ QtModule {
property string qscxmlcName: "qscxmlc"
property string className
property string namespace
+ property bool generateStateMethods
+ property stringList additionalCompilerFlags
Rule {
inputs: ["qt.scxml.compilable"]
@@ -37,6 +40,12 @@ QtModule {
var namespace = input.moduleProperty("Qt.scxml", "namespace");
if (namespace)
args.push("--namespace", namespace);
+ if (input.Qt.scxml.generateStateMethods
+ && Utilities.versionCompare(product.Qt.scxml.version, "5.9") >= 0) {
+ args.push("--statemethods");
+ }
+ if (input.Qt.scxml.additionalCompilerFlags)
+ args = args.concat(input.Qt.scxml.additionalCompilerFlags);
args.push(input.filePath);
var cmd = new Command(compilerPath, args);
cmd.description = "compiling " + input.fileName;