diff options
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml b/tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml new file mode 100644 index 0000000000..219e61bf91 --- /dev/null +++ b/tests/auto/qml/qqmlecmascript/data/propertyVar.1.qml @@ -0,0 +1,22 @@ +import QtQuick 2.0 + +Item { + id: root + property bool test: false + + property var car: new vehicle(4); + property int wheelCount: car.wheels + + function vehicle(wheels) { + this.wheels = wheels; + } + + Component.onCompleted: { + car.wheels = 6; // not bindable, wheelCount shouldn't update + + if (car.wheels != 6) return; + if (wheelCount != 4) return; + + test = true; + } +} |