diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-03-24 02:42:04 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-03-24 03:30:50 (GMT) |
commit | 364f6c200a6faac825c7f1e0158d708fc60a8ff5 (patch) | |
tree | a6c0d7632e2d06b65b5b211249b2990d1e3dd37c /tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp | |
parent | 30275dfcb8c5303de201bc32fba2a6b9b26fa1cd (diff) | |
download | Qt-364f6c200a6faac825c7f1e0158d708fc60a8ff5.zip Qt-364f6c200a6faac825c7f1e0158d708fc60a8ff5.tar.gz Qt-364f6c200a6faac825c7f1e0158d708fc60a8ff5.tar.bz2 |
Fix Loader leak when loading a non-QGraphicsObject object.
Diffstat (limited to 'tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp index f27c1ce..7123dda 100644 --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp @@ -91,6 +91,7 @@ private slots: // void networkComponent(); void deleteComponentCrash(); + void nonItem(); private: QDeclarativeEngine engine; @@ -485,6 +486,18 @@ void tst_QDeclarativeLoader::deleteComponentCrash() delete item; } +void tst_QDeclarativeLoader::nonItem() +{ + QSKIP("QTBUG-9245", SkipAll); + QDeclarativeComponent component(&engine, TEST_FILE("/nonItem.qml")); + QTest::ignoreMessage(QtWarningMsg, "QML Loader (file://" SRCDIR "/data/nonItem.qml:3:1) Loader does not support loading non-visual elements."); + QDeclarativeLoader *loader = qobject_cast<QDeclarativeLoader*>(component.create()); + QVERIFY(loader); + QVERIFY(loader->item() == 0); + + delete loader; +} + void tst_QDeclarativeLoader::networkSafety_data() { QTest::addColumn<QUrl>("url"); |