diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-10 06:26:30 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-10 06:26:30 (GMT) |
commit | 46595f3a20e9d1d8483172bdd27d17652c4d302e (patch) | |
tree | cc202e5bc1fab4cfe57a96da7e38c15ab25d0d12 /tests | |
parent | a221b2d7980932d09c20f215ad1dc56531ae7bf1 (diff) | |
download | Qt-46595f3a20e9d1d8483172bdd27d17652c4d302e.zip Qt-46595f3a20e9d1d8483172bdd27d17652c4d302e.tar.gz Qt-46595f3a20e9d1d8483172bdd27d17652c4d302e.tar.bz2 |
Test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp index 1ba9a52..2182ff4 100644 --- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp +++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp @@ -120,6 +120,7 @@ private slots: void undefinedResetsProperty(); void listToVariant(); void multiEngineObject(); + void deletedObject(); void bug1(); @@ -1637,6 +1638,22 @@ void tst_qmlecmascript::multiEngineObject() delete o1; } +// Test that references to QObjects are cleanup when the object is destroyed +void tst_qmlecmascript::deletedObject() +{ + QmlComponent component(&engine, TEST_FILE("deletedObject.qml")); + + QObject *object = component.create(); + + QCOMPARE(object->property("test1").toBool(), true); + QCOMPARE(object->property("test2").toBool(), true); + QCOMPARE(object->property("test3").toBool(), true); + QEXPECT_FAIL("", "QTBUG-8077", Continue); + QCOMPARE(object->property("test4").toBool(), true); + + delete object; +} + QTEST_MAIN(tst_qmlecmascript) #include "tst_qmlecmascript.moc" |