aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltype_p_p.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-06-22 16:17:22 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-06-25 14:16:56 +0200
commitf8c9fd6bfa5e6de4ac5d0176ebbc0292dbd031a2 (patch)
treed42aaeb086e1ddafaed10dc82f7cb1fcb6b33b9e /src/qml/qml/qqmltype_p_p.h
parent53476d31450d5dc69fef439d1a2060ffa01473b2 (diff)
QQmlRefCount: break all users that attempt to access the dtor
... by making the dtor private, accessible only via an auxiliary friend class QQmlRefCounted<T>. There are no users of QQmlRefCount outside of qtdeclarative, but we cannot rule out that users use this private API. Since we develop this patch as part of our own due diligence, we might as well put it into the 6.6 release so as to alert any potential users outside the qt5.git tree. Once this change is released as part of 6.6, we know we have no users of ~QQmlRefCount() (anymore), and can, in the next step, drop the virtual from the dtor, saving sizeof(void*) on each object in the hierarchy that isn't virtual of its own volition. Task-number: QTBUG-114817 Pick-to: 6.6 Change-Id: I16ea02dc57f9555e302d9415f3e573d8765cf7a3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltype_p_p.h')
-rw-r--r--src/qml/qml/qqmltype_p_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltype_p_p.h b/src/qml/qml/qqmltype_p_p.h
index e62e504d33..ab73da7a6b 100644
--- a/src/qml/qml/qqmltype_p_p.h
+++ b/src/qml/qml/qqmltype_p_p.h
@@ -26,7 +26,7 @@
QT_BEGIN_NAMESPACE
-class QQmlTypePrivate : public QQmlRefCount
+class QQmlTypePrivate : public QQmlRefCounted<QQmlTypePrivate>
{
Q_DISABLE_COPY_MOVE(QQmlTypePrivate)
public: