summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlecmascript/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlecmascript/data')
-rw-r--r--tests/auto/declarative/qmlecmascript/data/dynamicCreation.helper.qml5
-rw-r--r--tests/auto/declarative/qmlecmascript/data/dynamicCreation.qml16
-rw-r--r--tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml20
-rw-r--r--tests/auto/declarative/qmlecmascript/data/qmlToString.qml11
4 files changed, 52 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlecmascript/data/dynamicCreation.helper.qml b/tests/auto/declarative/qmlecmascript/data/dynamicCreation.helper.qml
new file mode 100644
index 0000000..58ca26e
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/dynamicCreation.helper.qml
@@ -0,0 +1,5 @@
+import Qt.Test 1.0
+
+MyQmlObject{
+ objectName: "desolateObject"
+}
diff --git a/tests/auto/declarative/qmlecmascript/data/dynamicCreation.qml b/tests/auto/declarative/qmlecmascript/data/dynamicCreation.qml
new file mode 100644
index 0000000..f3eb75f
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/dynamicCreation.qml
@@ -0,0 +1,16 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ id: obj
+ objectName: "obj"
+ function createOne()
+ {
+ obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"emptyObject"}', obj);
+ }
+
+ function createTwo()
+ {
+ var component = createComponent('dynamicCreation.helper.qml');
+ obj.objectProperty = component.createObject();
+ }
+}
diff --git a/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml b/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml
new file mode 100644
index 0000000..618723f
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml
@@ -0,0 +1,20 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ id: obj
+ objectName: "obj"
+ function create()
+ {
+ obj.objectProperty = createQmlObject('import Qt.test 1.0; MyQmlObject{objectName:"emptyObject"}', obj);
+ }
+
+ function killIt(wait)
+ {
+ if(obj.objectProperty == undefined || obj.objectProperty == null)
+ return;
+ if(wait > 0)
+ obj.objectProperty.destroy(wait);
+ else
+ obj.objectProperty.destroy();
+ }
+}
diff --git a/tests/auto/declarative/qmlecmascript/data/qmlToString.qml b/tests/auto/declarative/qmlecmascript/data/qmlToString.qml
new file mode 100644
index 0000000..ac296ce
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/qmlToString.qml
@@ -0,0 +1,11 @@
+import Qt.test 1.0
+
+MyQmlObject{
+ id: obj
+ objectName: "objName"
+ function testToString()
+ {
+ obj.stringProperty = obj.toString();
+ }
+
+}