diff options
Diffstat (limited to 'tests/auto/qml/qqmlbinding/data/whenEvaluatedEarlyEnough.qml')
-rw-r--r-- | tests/auto/qml/qqmlbinding/data/whenEvaluatedEarlyEnough.qml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlbinding/data/whenEvaluatedEarlyEnough.qml b/tests/auto/qml/qqmlbinding/data/whenEvaluatedEarlyEnough.qml new file mode 100644 index 0000000000..6245270e14 --- /dev/null +++ b/tests/auto/qml/qqmlbinding/data/whenEvaluatedEarlyEnough.qml @@ -0,0 +1,23 @@ +import QtQuick + +Item { + id: root + property bool toggle: true + property bool forceEnable: false + + Item { + id: item1 + property int i + } + + Item { + id: item2 + } + + Binding { + target: root.toggle ? item1 : item2 + when: root.forceEnable || (root.toggle ? item1 : item2).hasOwnProperty("i") + property: "i" + value: 42 + } +} |