From 9b5a55101d7c519446c1cf3706a235dea81ad4de Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 24 Jan 2013 14:07:29 -0800 Subject: Add qmlClearRegisteredTypes Function Registered types are stored in a global static variable, not on an engine instance. For applications managing multiple engines over their lifetime, there needs to be a way to clear the existing types so they can register new ones and avoid memory leaks. Task-Number: QTBUG-28572 Change-Id: Ic70a4dd1e29d99399b21fb42eaf10d4a52bf2adf Reviewed-by: Christopher Adams --- tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/qml/qqmllanguage') diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 5a924a901a..47a9f3927b 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -242,6 +242,7 @@ private: void tst_qqmllanguage::cleanupTestCase() { QVERIFY(QFile::remove(testFile(QString::fromUtf8("I18nType\303\201\303\242\303\243\303\244\303\245.qml")))); + qmlClearTypeRegistrations(); // Should not crash } void tst_qqmllanguage::insertedSemicolon_data() -- cgit v1.2.3