Fix test fails related to QTBUG-22237
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qquickloader / data / initialPropertyValues.1.qml
1 import QtQuick 2.0
2
3 Item {
4     id: root
5     property int initialValue: 0
6     property int behaviorCount: 0
7
8     Loader {
9         id: loader
10         objectName: "loader"
11
12         onLoaded: {
13             loader.item.canary = 1; // will trigger the behavior, setting behaviorCount -> 1
14         }
15     }
16
17     Component.onCompleted: {
18         loader.source = "InitialPropertyValuesComponent.qml";
19         root.initialValue = loader.item.canary;         // should be one, since onLoaded will have triggered by now
20         root.behaviorCount = loader.item.behaviorCount; // should be one, since onLoaded will have triggered by now
21     }
22 }