aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data/propertyVarOwnership.qml
blob: 7b99c4b6ad8ba597f092e65033f3ce397de0053c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QtQuick 2.0
import Qt.test 1.0

Item {
    id: testOwnership
    property bool test: false

    property var varProperty

    function runTest() {
        if (varProperty != undefined) return;
        varProperty = { a: 10, b: 11 }
        if (varProperty.a != 10) return;

        gc(); // Shouldn't collect

        if (varProperty.a != 10) return;

        test = true;
    } 
}