aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlenginecleanup
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-02-17 01:01:00 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-02-17 10:21:59 +0100
commit3e758800b4daf8fbc870a2ff5d54fce9d4402ce8 (patch)
treeba237b9da1c7dfd08bf13e71c5dbd6b3c2e77633 /tests/auto/qml/qqmlenginecleanup
parent925a0e499a5dbdb180fd9969a79abf96006ce4fd (diff)
parent55546991e24ca6799709cbe0171b9ab87216c35f (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/imports/qtqml/plugin.cpp src/qml/qml/qqml.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypeloader.cpp src/qml/types/qqmlbind.cpp src/quick/items/qquickitemsmodule.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
Diffstat (limited to 'tests/auto/qml/qqmlenginecleanup')
-rw-r--r--tests/auto/qml/qqmlenginecleanup/data/MyItem.qml2
-rw-r--r--tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp13
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlenginecleanup/data/MyItem.qml b/tests/auto/qml/qqmlenginecleanup/data/MyItem.qml
new file mode 100644
index 0000000000..4bb8dfb486
--- /dev/null
+++ b/tests/auto/qml/qqmlenginecleanup/data/MyItem.qml
@@ -0,0 +1,2 @@
+import QtQuick 2.12
+Item {}
diff --git a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp
index 0e70933ec6..26b2b839ea 100644
--- a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp
+++ b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp
@@ -45,6 +45,7 @@ private slots:
void test_qmlClearTypeRegistrations();
void test_valueTypeProviderModule(); // QTBUG-43004
void test_customModuleCleanup();
+ void test_qmlListCleared();
};
// A wrapper around QQmlComponent to ensure the temporary reference counts
@@ -187,6 +188,18 @@ void tst_qqmlenginecleanup::test_customModuleCleanup()
}
}
+void tst_qqmlenginecleanup::test_qmlListCleared()
+{
+ {
+ QQmlEngine engine;
+ auto url = testFileUrl("MyItem.qml");
+ QQmlComponent comp(&engine, url);
+ QScopedPointer<QObject> item {comp.create()};
+ QCOMPARE(QQmlMetaType::qmlRegisteredListTypeCount(), 1);
+ }
+ QCOMPARE(QQmlMetaType::qmlRegisteredListTypeCount(), 0);
+}
+
QTEST_MAIN(tst_qqmlenginecleanup)
#include "tst_qqmlenginecleanup.moc"