diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-04-07 03:26:59 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-04-07 04:27:47 (GMT) |
commit | 0bfcb67886df2c446b38c4ca0ec8309a32493d00 (patch) | |
tree | 4304b4191c6a77d6f926cfb9de4eea30af3d4d15 /tests/auto/declarative/qdeclarativerepeater | |
parent | 0bd3c6b059986e92ecca1c926afd123074187f49 (diff) | |
download | Qt-0bfcb67886df2c446b38c4ca0ec8309a32493d00.zip Qt-0bfcb67886df2c446b38c4ca0ec8309a32493d00.tar.gz Qt-0bfcb67886df2c446b38c4ca0ec8309a32493d00.tar.bz2 |
Make sure tests cleanup after themselves.
Diffstat (limited to 'tests/auto/declarative/qdeclarativerepeater')
-rw-r--r-- | tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 09c4879..419f5ea 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -181,6 +181,7 @@ void tst_QDeclarativeRepeater::numberModel() QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties"); QVERIFY(testObject->error() == false); + delete testObject; delete canvas; } @@ -204,6 +205,9 @@ void tst_QDeclarativeRepeater::objectList() QVERIFY(repeater != 0); QCOMPARE(repeater->property("errors").toInt(), 0);//If this fails either they are out of order or can't find the object's data QCOMPARE(repeater->property("instantiated").toInt(), 100); + + qDeleteAll(data); + delete canvas; } /* @@ -293,6 +297,9 @@ void tst_QDeclarativeRepeater::dataModel() testModel.removeItem(2); QCOMPARE(container->childItems().count(), 4); + + delete testObject; + delete canvas; } void tst_QDeclarativeRepeater::itemModel() @@ -323,6 +330,7 @@ void tst_QDeclarativeRepeater::itemModel() QVERIFY(qobject_cast<QObject*>(container->childItems().at(2))->objectName() == "item3"); QVERIFY(container->childItems().at(3) == repeater); + delete testObject; delete canvas; } @@ -352,6 +360,8 @@ void tst_QDeclarativeRepeater::properties() QCOMPARE(delegateSpy.count(),1); repeater->setDelegate(&rectComponent); QCOMPARE(delegateSpy.count(),1); + + delete rootObject; } QDeclarativeView *tst_QDeclarativeRepeater::createView() |