Disable copies in QObjectData / QObjectUserData
They're meant to be subclassed, so we need to avoid slicing. Change-Id: I384b65478f728c69aaf1edbc985b3fb4150191fe Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
2e83528856
commit
eb8b63542f
@ -173,6 +173,12 @@ int (*QAbstractDeclarativeData::receivers)(QAbstractDeclarativeData *, const QO
|
||||
bool (*QAbstractDeclarativeData::isSignalConnected)(QAbstractDeclarativeData *, const QObject *, int) = 0;
|
||||
void (*QAbstractDeclarativeData::setWidgetParent)(QObject *, QObject *) = 0;
|
||||
|
||||
/*!
|
||||
\fn QObjectData::QObjectData()
|
||||
\internal
|
||||
*/
|
||||
|
||||
|
||||
QObjectData::~QObjectData() {}
|
||||
|
||||
QMetaObject *QObjectData::dynamicMetaObject() const
|
||||
@ -4168,6 +4174,11 @@ uint QObject::registerUserData()
|
||||
return user_data_registration++;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QObjectUserData::QObjectUserData()
|
||||
\internal
|
||||
*/
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
@ -93,7 +93,9 @@ Q_CORE_EXPORT void qt_qFindChildren_helper(const QObject *parent, const QRegular
|
||||
Q_CORE_EXPORT QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo, Qt::FindChildOptions options);
|
||||
|
||||
class Q_CORE_EXPORT QObjectData {
|
||||
Q_DISABLE_COPY(QObjectData)
|
||||
public:
|
||||
QObjectData() = default;
|
||||
virtual ~QObjectData() = 0;
|
||||
QObject *q_ptr;
|
||||
QObject *parent;
|
||||
@ -472,7 +474,9 @@ inline const QMetaObject *qt_getQtMetaObject() noexcept
|
||||
|
||||
#ifndef QT_NO_USERDATA
|
||||
class Q_CORE_EXPORT QObjectUserData {
|
||||
Q_DISABLE_COPY(QObjectUserData)
|
||||
public:
|
||||
QObjectUserData() = default;
|
||||
virtual ~QObjectUserData();
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user