aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlformat
diff options
context:
space:
mode:
authorEvgeniy A. Dushistov <dushistov@mail.ru>2020-08-15 13:13:45 +0300
committerEvgeniy A. Dushistov <dushistov@mail.ru>2020-08-20 17:23:40 +0300
commitac68310b7857693c9eb7ccb782133ac9ec8e2328 (patch)
tree2986baa269480ab4f403ef024e95941faa3f9802 /tests/auto/qml/qmlformat
parentf04497b5d24e908beb50dff04b0a03358d7993c7 (diff)
qmlformat: fix handling of "if else" inside "if" in "if else"
Fixes: QTBUG-86060 Change-Id: I7a191c451793bf4e1f6a2bd02ceb36b5957136c2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat')
-rw-r--r--tests/auto/qml/qmlformat/data/nestedIf.formatted.qml7
-rw-r--r--tests/auto/qml/qmlformat/data/nestedIf.qml10
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlformat/data/nestedIf.formatted.qml b/tests/auto/qml/qmlformat/data/nestedIf.formatted.qml
index 6c17f18a9c..11acf5b568 100644
--- a/tests/auto/qml/qmlformat/data/nestedIf.formatted.qml
+++ b/tests/auto/qml/qmlformat/data/nestedIf.formatted.qml
@@ -25,5 +25,12 @@ Item {
x();
}
}
+ if (x && y)
+ if (x < y)
+ return 0;
+ else
+ return -1;
+ else
+ return y;
}
}
diff --git a/tests/auto/qml/qmlformat/data/nestedIf.qml b/tests/auto/qml/qmlformat/data/nestedIf.qml
index 9388dd42f6..fb65e409b4 100644
--- a/tests/auto/qml/qmlformat/data/nestedIf.qml
+++ b/tests/auto/qml/qmlformat/data/nestedIf.qml
@@ -26,5 +26,13 @@ Component.onCompleted: {
x();
}
}
+
+ if (x && y)
+ if (x < y)
+ return 0;
+ else
+ return -1;
+ else
+ return y;
+}
}
-} \ No newline at end of file