diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-28 13:28:09 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-28 13:28:10 +0200 |
commit | 63398defdbec12979b61120f690e984af0496c37 (patch) | |
tree | ab7a29ea0040d46c47004fed3c211a831bc48e9c /tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp | |
parent | cff8d9f1d2d309cd9417bb93386a1443ed1892c3 (diff) | |
parent | 692b2da77427259a3589cf8a1311075863f2f5ec (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I59343fe228ca6b823b61577e5a0907e7381899c2
Diffstat (limited to 'tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp')
-rw-r--r-- | tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp index b9cede6d13..690db30838 100644 --- a/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp +++ b/tests/auto/qml/qqmlenginecleanup/tst_qqmlenginecleanup.cpp @@ -44,6 +44,7 @@ public: private slots: void test_qmlClearTypeRegistrations(); void test_valueTypeProviderModule(); // QTBUG-43004 + void test_customModuleCleanup(); }; // A wrapper around QQmlComponent to ensure the temporary reference counts @@ -168,6 +169,23 @@ void tst_qqmlenginecleanup::test_valueTypeProviderModule() QVERIFY(noDangling); } +void tst_qqmlenginecleanup::test_customModuleCleanup() +{ + for (int i = 0; i < 5; ++i) { + qmlClearTypeRegistrations(); + + QQmlEngine engine; + engine.addImportPath(QT_TESTCASE_BUILDDIR); + + QQmlComponent component(&engine); + component.setData("import CustomModule 1.0\nModuleType {}", QUrl()); + QCOMPARE(component.status(), QQmlComponent::Ready); + + QScopedPointer<QObject> object(component.create()); + QVERIFY(!object.isNull()); + } +} + QTEST_MAIN(tst_qqmlenginecleanup) #include "tst_qqmlenginecleanup.moc" |