aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlformat/data
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-07-01 12:15:15 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2020-07-01 12:34:53 +0200
commit38e0b279d9c36d029918a2d86575050d13778d86 (patch)
tree6ddef407d5160e0f635ad9eb0ca8c6cc0f8bc297 /tests/auto/qml/qmlformat/data
parentc50512fab3219f5d94a030227624f512756356c5 (diff)
qmlformat: Fix multiline bindings
Some bindings may turn multiline while formatting. This change makes sure this is handled properly. Fixes: QTBUG-85289 Pick-to: 5.15 Change-Id: I6df98b926d69a23480003c3d9705bc34c3dd0d5d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat/data')
-rw-r--r--tests/auto/qml/qmlformat/data/largeBindings.formatted.qml5
-rw-r--r--tests/auto/qml/qmlformat/data/largeBindings.qml1
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/data/largeBindings.formatted.qml b/tests/auto/qml/qmlformat/data/largeBindings.formatted.qml
index d8e4ffb087..8bd502ccab 100644
--- a/tests/auto/qml/qmlformat/data/largeBindings.formatted.qml
+++ b/tests/auto/qml/qmlformat/data/largeBindings.formatted.qml
@@ -1,6 +1,11 @@
QtObject {
small1: 3
small2: foo
+ smallButNeedsBraces: {
+ if (foo) {
+ bar();
+ }
+ }
// THIS NEEDS TO BE LAST
largeBinding: {
var x = 300;
diff --git a/tests/auto/qml/qmlformat/data/largeBindings.qml b/tests/auto/qml/qmlformat/data/largeBindings.qml
index a2249f6815..9f69e9ad50 100644
--- a/tests/auto/qml/qmlformat/data/largeBindings.qml
+++ b/tests/auto/qml/qmlformat/data/largeBindings.qml
@@ -8,4 +8,5 @@ QtObject
small1: 3
small2: foo
+ smallButNeedsBraces: if (foo) { bar(); }
}