diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-10-07 10:24:29 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-10-07 10:43:17 +0200 |
commit | 49391fcc41d871836868452b8300938d0b94f00e (patch) | |
tree | 4838e309dbad1a223f3d2754be0e49d7bebe0648 /tests/auto/qml/qmlformat/data | |
parent | e7e04656696d144e57c9bec1b6ca7d30d237ee70 (diff) |
qmlformat: Fix computed property names
Fixes: QTBUG-87222
Pick-to: 5.15
Change-Id: If1da02d503041009b82651e1087fb4a1bdd79d59
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat/data')
-rw-r--r-- | tests/auto/qml/qmlformat/data/propertyNames.formatted.qml | 14 | ||||
-rw-r--r-- | tests/auto/qml/qmlformat/data/propertyNames.qml | 13 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/data/propertyNames.formatted.qml b/tests/auto/qml/qmlformat/data/propertyNames.formatted.qml new file mode 100644 index 0000000000..c7d50abb32 --- /dev/null +++ b/tests/auto/qml/qmlformat/data/propertyNames.formatted.qml @@ -0,0 +1,14 @@ +Item { + function x() { + var copiedItem = "copied value"; + var computedItem = "computedName"; + var obj = { + "identifierName": "identifier value", + "string name": "string value", + "Infinity": "numeric value", + [computedItem]: "computed value", + "copiedItem": copiedItem + }; + } + +} diff --git a/tests/auto/qml/qmlformat/data/propertyNames.qml b/tests/auto/qml/qmlformat/data/propertyNames.qml new file mode 100644 index 0000000000..9214014889 --- /dev/null +++ b/tests/auto/qml/qmlformat/data/propertyNames.qml @@ -0,0 +1,13 @@ +Item { + function x() { + var copiedItem = "copied value"; + var computedItem = "computedName"; + var obj = { + identifierName: "identifier value", + "string name": "string value", + Infinity: "numeric value", + [computedItem]: "computed value", + copiedItem + }; + } +} |