Use V4 binding for non-final properties where possible
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlecmascript / data / QQmlDataDestroyedComponent2Base.qml
1 import QtQuick 2.0
2 import Qt.test.qobjectApi 1.0 as ModApi
3
4 Rectangle {
5     id: base
6     x: 1
7     color: "red"
8     property bool testConditionsMet: false
9
10     onXChanged: {
11         ModApi.trackObject(base);
12         ModApi.trackedObject(); // flip the ownership.
13         if (!ModApi.trackedObjectHasJsOwnership())
14             testConditionsMet = false;
15         else
16             testConditionsMet = true;
17    }
18
19     onColorChanged: {
20         // will be triggered during beginCreate of derived
21         test.testConditionsMet = testConditionsMet;
22         gc();
23         gc();
24         gc();
25     }
26 }