Fix test fails related to QTBUG-22237
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qquickloader / data / initialPropertyValues.7.qml
1 import QtQuick 2.0
2
3 Item {
4     id: root
5     property int loaderValue: 0
6     property int createObjectValue: 0
7
8     Loader {
9         id: loader
10         objectName: "loader"
11         onLoaded: {
12             root.loaderValue = loader.item.canary; // should still be one
13         }
14     }
15
16     Item {
17         id: child
18         property int bindable: 1;
19     }
20
21     property InitialPropertyValuesComponent ipvc
22     Component.onCompleted: {
23         loader.setSource("InitialPropertyValuesComponent.qml", {"canary": child.bindable});
24         var dynComp = Qt.createComponent("InitialPropertyValuesComponent.qml");
25         ipvc = dynComp.createObject(root, {"canary": child.bindable});
26         child.bindable = 7; // won't cause re-evaluation, since not used in a binding.
27         root.createObjectValue = ipvc.canary;   // should still be one
28     }
29 }