aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlopenmetaobject_p.h
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 /src/qml/qml/qqmlopenmetaobject_p.h
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 'src/qml/qml/qqmlopenmetaobject_p.h')
-rw-r--r--src/qml/qml/qqmlopenmetaobject_p.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h
index 441556a079..f6397c8c59 100644
--- a/src/qml/qml/qqmlopenmetaobject_p.h
+++ b/src/qml/qml/qqmlopenmetaobject_p.h
@@ -55,7 +55,6 @@
#include <QtCore/QObject>
#include <private/qqmlrefcount_p.h>
-#include <private/qqmlcleanup_p.h>
#include <private/qtqmlglobal_p.h>
#include <private/qobject_p.h>
@@ -65,10 +64,10 @@ QT_BEGIN_NAMESPACE
class QQmlEngine;
class QMetaPropertyBuilder;
class QQmlOpenMetaObjectTypePrivate;
-class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObjectType : public QQmlRefCount, public QQmlCleanup
+class Q_QML_PRIVATE_EXPORT QQmlOpenMetaObjectType : public QQmlRefCount
{
public:
- QQmlOpenMetaObjectType(const QMetaObject *base, QQmlEngine *engine);
+ QQmlOpenMetaObjectType(const QMetaObject *base);
~QQmlOpenMetaObjectType() override;
void createProperties(const QVector<QByteArray> &names);
@@ -83,7 +82,6 @@ public:
protected:
virtual void propertyCreated(int, QMetaPropertyBuilder &);
- void clear() override;
private:
QQmlOpenMetaObjectTypePrivate *d;