aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-13 12:33:06 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-13 14:32:34 +0100
commitcfe0b08b5439a27b4fdd14c29620e0492543f506 (patch)
treee45d282b23bec6504dbaba2b784bbaaa44f0b16b /tests
parentb64f8dacae36fca948933cf56498d5e4ad3e2a07 (diff)
Remove QQmlCleanup
The only place where it was still used is QQmlOpenMetaObjecType. The only effect of QQmlCleanup is that clear() is eventually called by the engine. In the case of QQmlOpenMetaObjectType the only effect of that was that the "engine" member was reset. However, the only place where that member was used was in setCached(), and in that place it was irrelevant. There is no reason why setCached() should be prohibited when there is no engine. We may be worried that the property cache assigned to the open metaobject might go away somehow if there is no engine, but the cleanup mechanism clearly demonstrates that checking for the engine on setCached() does not protect against this. Fixes: QTBUG-90004 Change-Id: I05445eaeb53a64c70de366090ea2ee4aecf2bad8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlopenmetaobject/tst_qqmlopenmetaobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlopenmetaobject/tst_qqmlopenmetaobject.cpp b/tests/auto/qml/qqmlopenmetaobject/tst_qqmlopenmetaobject.cpp
index 44ce1d6987..6265c6ca67 100644
--- a/tests/auto/qml/qqmlopenmetaobject/tst_qqmlopenmetaobject.cpp
+++ b/tests/auto/qml/qqmlopenmetaobject/tst_qqmlopenmetaobject.cpp
@@ -52,7 +52,7 @@ void tst_qqmlopenmetaobject::createProperties()
{
QQmlEngine engine;
CustomObject object;
- const QQmlRefPointer<QQmlOpenMetaObjectType> mot = new QQmlOpenMetaObjectType(object.metaObject(), &engine);
+ const QQmlRefPointer<QQmlOpenMetaObjectType> mot = new QQmlOpenMetaObjectType(object.metaObject());
QQmlOpenMetaObject *const mo = new QQmlOpenMetaObject(&object, mot.data());
mo->setCached(true);
mot->createProperty("customProperty");