diff options
Diffstat (limited to 'tests/auto/declarative/qmlxmlhttprequest/data/constructor.qml')
-rw-r--r-- | tests/auto/declarative/qmlxmlhttprequest/data/constructor.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlxmlhttprequest/data/constructor.qml b/tests/auto/declarative/qmlxmlhttprequest/data/constructor.qml new file mode 100644 index 0000000..93e44fd --- /dev/null +++ b/tests/auto/declarative/qmlxmlhttprequest/data/constructor.qml @@ -0,0 +1,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); + } +} |