diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2016-10-10 17:44:19 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2016-10-14 14:42:07 +0000 |
commit | 47b575a3b3bf7dc104e1b91babc986577a63ff37 (patch) | |
tree | e6fedd69fab4011a29a32f3cc912fa52d51c1a60 /tests/auto/blackbox/testdata/QTBUG-51237 | |
parent | 1e60fab274e722efa01bce67c9acc56627fcc801 (diff) |
Convert null variant values to empty lists
... if their declared type is a list. This is a workaround for
QTBUG-51237.
Change-Id: Ie9e02f5fd125ce73b993e59af0e3dc2b47fe14c1
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata/QTBUG-51237')
-rw-r--r-- | tests/auto/blackbox/testdata/QTBUG-51237/modules/mymodule/mymodule.qbs | 6 | ||||
-rw-r--r-- | tests/auto/blackbox/testdata/QTBUG-51237/qtbug-51237.qbs | 22 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/QTBUG-51237/modules/mymodule/mymodule.qbs b/tests/auto/blackbox/testdata/QTBUG-51237/modules/mymodule/mymodule.qbs new file mode 100644 index 000000000..223da0b3c --- /dev/null +++ b/tests/auto/blackbox/testdata/QTBUG-51237/modules/mymodule/mymodule.qbs @@ -0,0 +1,6 @@ +import qbs + +Module { + property stringList theProperty: [] + //property stringList otherProperty: theProperty.concat([]) +} diff --git a/tests/auto/blackbox/testdata/QTBUG-51237/qtbug-51237.qbs b/tests/auto/blackbox/testdata/QTBUG-51237/qtbug-51237.qbs new file mode 100644 index 000000000..e1f8d8ef6 --- /dev/null +++ b/tests/auto/blackbox/testdata/QTBUG-51237/qtbug-51237.qbs @@ -0,0 +1,22 @@ +import qbs + +Product { + type: "custom" + Depends { name: "mymodule" } + Rule { + multiplex: true + Artifact { + filePath: "dummy.custom" + fileTags: ["custom"] + } + prepare: { + var theProperty = product.moduleProperty("mymodule", "theProperty"); + if (!theProperty) + throw "Oh no!"; + var dummy = new JavaScriptCommand(); + dummy.silent = true; + dummy.sourceCode = function() {}; + return [dummy]; + } + } +} |