summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlxmlhttprequest/data/constructor.qml
blob: 93e44fd9e2fc316756000b0f067489fbc9832618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Qt 4.6

QtObject {
    property bool calledAsConstructor
    property bool calledAsFunction

    Component.onCompleted: {
        var x1 = new XMLHttpRequest;
        var x2 = XMLHttpRequest();

        calledAsConstructor = (x1 != null && x1 instanceof XMLHttpRequest);
        calledAsFunction = (x2 == undefined);
    }
}