aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/propertyQJSValue.12.qml
blob: 78390a0a6de1053640b26b0949084c0e3d2afb77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import QtQuick 2.0
import Qt.test 1.0

Item {
    property bool test: false

    MyQmlObject { id: nullOneObj; qjsvalue: null }
    MyQmlObject { id: nullTwoObj; }
    MyQmlObject { id: undefOneObj; qjsvalue: undefined }
    MyQmlObject { id: undefTwoObj }

    property alias nullOne: nullOneObj.qjsvalue
    property alias nullTwo: nullTwoObj.qjsvalue
    property alias undefOne: undefOneObj.qjsvalue
    property alias undefTwo: undefTwoObj.qjsvalue

    Component.onCompleted: {
        nullTwo = null;
        undefTwo = undefined;
        if (nullOne != null) return;
        if (nullOne != nullTwo) return;
        if (undefOne != undefined) return;
        if (undefOne != undefTwo) return;
        test = true;
    }
}