summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-17 22:34:53 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-17 22:36:10 (GMT)
commit412920402f488c2cf6eb81e7582f9b5aa7b06680 (patch)
treec6e520b80e8113e89979cd025e93f5b3846c0ee3
parent1b183c42b5ce74797f12a155c6675e195fe96352 (diff)
downloadQt-412920402f488c2cf6eb81e7582f9b5aa7b06680.zip
Qt-412920402f488c2cf6eb81e7582f9b5aa7b06680.tar.gz
Qt-412920402f488c2cf6eb81e7582f9b5aa7b06680.tar.bz2
Add autotest for d169873541ca6f6725e9ce5bfbbf9941f1823a1f.
-rw-r--r--tests/auto/declarative/qmlecmascript/data/CustomObject.qml5
-rw-r--r--tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml8
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp9
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlecmascript/data/CustomObject.qml b/tests/auto/declarative/qmlecmascript/data/CustomObject.qml
new file mode 100644
index 0000000..691d9ec
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/CustomObject.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+QtObject {
+ property string greeting: "hello world"
+}
diff --git a/tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml b/tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml
new file mode 100644
index 0000000..80a2814
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/compositePropertyType.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+QtObject {
+ property CustomObject myObject
+ myObject: CustomObject { }
+
+ Component.onCompleted: console.log(myObject.greeting)
+}
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index b9a2241..f0e54ef 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -110,6 +110,7 @@ private slots:
void transientErrors();
void shutdownErrors();
void externalScript();
+ void compositePropertyType();
void bug1();
@@ -1017,6 +1018,14 @@ void tst_qmlecmascript::externalScript()
}
}
+void tst_qmlecmascript::compositePropertyType()
+{
+ QmlComponent component(&engine, TEST_FILE("compositePropertyType.qml"));
+ QTest::ignoreMessage(QtDebugMsg, "hello world");
+ QObject *object = qobject_cast<QObject *>(component.create());
+ delete object;
+}
+
void tst_qmlecmascript::bug1()
{
QmlComponent component(&engine, TEST_FILE("bug.1.qml"));