Use V4 binding for non-final properties where possible
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / propertyVar.6.qml
1 import QtQuick 2.0
2
3 Item {
4     property bool test: false
5
6     property var items: [1, 2, 3, "four", "five"]
7     property int bound: items[0]
8     property var funcs: [(function() { return 6; })]
9     property int bound2: funcs[0]()
10
11     function returnTwenty() {
12         return 20;
13     }
14
15     Component.onCompleted: {
16         if (bound != 1) return false;
17         if (bound2 != 6) return false;
18
19         items = [10, 2, 3, "four", "five"]  // bound should now be 10
20         funcs = [returnTwenty]              // bound2 should now be 20
21
22         if (bound != 10) return false;
23         if (bound2 != 20) return false;
24
25         test = true;
26     }
27 }