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

Object {
    property bool calledAsConstructor
    property bool calledAsFunction

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

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