diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-06-18 14:36:37 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-06-25 09:02:10 +0200 |
commit | eb90e8ee3313bee547e6721a2649bf9ba84e3e5c (patch) | |
tree | 2c578f90d6c2c267498cb7ab919d75c68751ad91 /tests/auto/qml/qmlformat/data | |
parent | 88b3d1fd26b6b566ef00ae728051bff29455eea5 (diff) |
qmlformat: Fix nested functions
Fixes: QTBUG-85035
Change-Id: I5e1cb003b7b84547e3408a086eebf3be740e6860
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat/data')
-rw-r--r-- | tests/auto/qml/qmlformat/data/IfBlocks.formatted.qml | 1 | ||||
-rw-r--r-- | tests/auto/qml/qmlformat/data/nestedFunctions.formatted.qml | 16 | ||||
-rw-r--r-- | tests/auto/qml/qmlformat/data/nestedFunctions.qml | 14 |
3 files changed, 30 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlformat/data/IfBlocks.formatted.qml b/tests/auto/qml/qmlformat/data/IfBlocks.formatted.qml index b26361d5bf..ddba82c312 100644 --- a/tests/auto/qml/qmlformat/data/IfBlocks.formatted.qml +++ b/tests/auto/qml/qmlformat/data/IfBlocks.formatted.qml @@ -1,5 +1,4 @@ Item { - function test() { //// The following if blocks should NOT HAVE braces // Single branch, no braces diff --git a/tests/auto/qml/qmlformat/data/nestedFunctions.formatted.qml b/tests/auto/qml/qmlformat/data/nestedFunctions.formatted.qml new file mode 100644 index 0000000000..5a3489e98f --- /dev/null +++ b/tests/auto/qml/qmlformat/data/nestedFunctions.formatted.qml @@ -0,0 +1,16 @@ +Item { + function a() { + function nested() { + } + + foo(); + } + + function b() { + function nested() { + } + + bar(); + } + +} diff --git a/tests/auto/qml/qmlformat/data/nestedFunctions.qml b/tests/auto/qml/qmlformat/data/nestedFunctions.qml new file mode 100644 index 0000000000..592e3197ab --- /dev/null +++ b/tests/auto/qml/qmlformat/data/nestedFunctions.qml @@ -0,0 +1,14 @@ +Item { +function a() { + function nested() {} + + foo(); +} + +function b() { + function nested() {} + + bar(); +} + +}
\ No newline at end of file |