diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2012-04-04 12:17:59 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-04 13:29:19 +0200 |
commit | 8b0831f0b09847331eb59598a09ad6865800ef01 (patch) | |
tree | 18bfb930c0d1ad8ac16836f90eb9669b9d1bd954 /tests/auto/qml/qqmlecmascript/data/replaceBinding.qml | |
parent | 03a6db7fc17355d4478da05891860df6c0eb1560 (diff) |
Do not execute overwritten bindings
During the construction of an object, internal bindings can be
overwritten by the initialization of objects with outer scope.
Task-number: QTBUG-23138
Change-Id: I46a187d9cdc41f4dd96d068f39788a2255b8888d
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/replaceBinding.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/replaceBinding.qml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/replaceBinding.qml b/tests/auto/qml/qqmlecmascript/data/replaceBinding.qml new file mode 100644 index 0000000000..670231a144 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/replaceBinding.qml @@ -0,0 +1,26 @@ +import QtQuick 2.0 + +OuterObject { + property bool success: false + + inner.foo1: 200 + inner.foo2: { return 200; } + inner.foo3: 200 + inner.foo4: { return 200; } + + inner.bar1: 'Goodbye' + inner.bar2: { return 'Goodbye' } + inner.bar3: 'Goodbye' + inner.bar4: { return 'Goodbye' } + + Component.onCompleted: { + success = (inner.foo1 == 200 && + inner.foo2 == 200 && + inner.foo3 == 200 && + inner.foo4 == 200 && + inner.bar1 == 'Goodbye' && + inner.bar2 == 'Goodbye' && + inner.bar3 == 'Goodbye' && + inner.bar4 == 'Goodbye'); + } +} |