diff options
author | Semih Yavuz <semih.yavuz@qt.io> | 2023-06-08 09:30:36 +0200 |
---|---|---|
committer | Semih Yavuz <semih.yavuz@qt.io> | 2023-06-09 15:46:30 +0200 |
commit | 38da583642529038c1d226f54946134a7261b654 (patch) | |
tree | 27a30634a1377f528f5cbda88e4880003a9ee0a9 /tests/auto/qml/qmlformat | |
parent | ca307bd9a73ed9b9fc597cc69f757b77fbfee9ee (diff) |
qmlformat: Handle pragma directive correctly
Dom representation for pragma used to be created by leaving out pragma
directive value list. That caused qmlformat to remove the corresponding
list.
Fix it by including value list while creating dom for pragma.
Fixes: QTBUG-114364
Pick-to: 6.5 6.6
Change-Id: I87f6e324452f196c147f5606f15c01e22caa39a5
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlformat')
-rw-r--r-- | tests/auto/qml/qmlformat/data/pragma.formatted.qml | 8 | ||||
-rw-r--r-- | tests/auto/qml/qmlformat/data/pragma.qml | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlformat/data/pragma.formatted.qml b/tests/auto/qml/qmlformat/data/pragma.formatted.qml new file mode 100644 index 0000000000..fba9d15f3c --- /dev/null +++ b/tests/auto/qml/qmlformat/data/pragma.formatted.qml @@ -0,0 +1,8 @@ +pragma Singleton +pragma ComponentBehavior: Bound +pragma FunctionSignatureBehavior: Enforced +pragma ValueTypeBehavior: Copy, Addressable +import QtQml + +QtObject { +} diff --git a/tests/auto/qml/qmlformat/data/pragma.qml b/tests/auto/qml/qmlformat/data/pragma.qml new file mode 100644 index 0000000000..7469277395 --- /dev/null +++ b/tests/auto/qml/qmlformat/data/pragma.qml @@ -0,0 +1,8 @@ +pragma Singleton + pragma ComponentBehavior: Bound + pragma FunctionSignatureBehavior: Enforced +pragma ValueTypeBehavior: Copy, Addressable + +import QtQml + +QtObject {} |