diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2021-02-25 15:46:20 +0100 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2021-03-02 11:55:27 +0100 |
commit | 595dd75e3a6c74468d1752ebf3b6f1edc6a44882 (patch) | |
tree | 9efc8797fd85a5c0da6957d9f38c9eec549177c1 /tests/auto/qml/qmlcompiler_manual/data/propertyReturningFunction.qml | |
parent | 4ebb4630e23fc6e0475ea7b3e4c10cec3cfb1ea9 (diff) |
Add "property var p: function() {}" test to tst_qmlcompiler_manual
This case is apparently very similar to "onSignal: function() {}", but
the behavior is completely different: instead of running the nested
function, we should only return it without evaluation. Add this as an
explicit test case to make sure QQmlEngine machinery behaves correctly
Change-Id: If426a934d4e5aa714f62cc437a75f8d16292a759
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcompiler_manual/data/propertyReturningFunction.qml')
-rw-r--r-- | tests/auto/qml/qmlcompiler_manual/data/propertyReturningFunction.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcompiler_manual/data/propertyReturningFunction.qml b/tests/auto/qml/qmlcompiler_manual/data/propertyReturningFunction.qml new file mode 100644 index 0000000000..a8472c3332 --- /dev/null +++ b/tests/auto/qml/qmlcompiler_manual/data/propertyReturningFunction.qml @@ -0,0 +1,8 @@ +import QtQml 2.0 + +QtObject { + property int counter: 0 + property var f: function() { + counter++; + } +} |