aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qtqmlmodules/data/unavailable.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qtqmlmodules/data/unavailable.qml')
-rw-r--r--tests/auto/qml/qtqmlmodules/data/unavailable.qml35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/auto/qml/qtqmlmodules/data/unavailable.qml b/tests/auto/qml/qtqmlmodules/data/unavailable.qml
new file mode 100644
index 0000000000..5841e3f677
--- /dev/null
+++ b/tests/auto/qml/qtqmlmodules/data/unavailable.qml
@@ -0,0 +1,35 @@
+import QtQml 2.0
+
+QtObject {
+ id: root
+ property bool success: false;
+ Component.onCompleted: {
+ var strings = [
+ "QtObject{}",
+ "Binding{}",
+ "Connections{}",
+ "Timer{}",
+ "Component{QtObject{}}",
+ "ListModel{ListElement{}}",
+ "ObjectModel{QtObject{}}",
+ "import QtQml 2.0 Item{}",
+ "import QtQml 2.0 ListModel{}",
+ "import QtQml 2.0 ObjectModel{}"
+ ];
+ var idx;
+ for (idx in strings) {
+ var errored = false;
+ var item;
+ try {
+ item = Qt.createQmlObject(strings[idx], root);
+ } catch (err) {
+ errored = true;
+ }
+ if (!errored) {
+ console.log("It worked? ", item);
+ return;
+ }
+ }
+ root.success = true;
+ }
+}