summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp68
1 files changed, 2 insertions, 66 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index bb1b48b0a6..d713555bb6 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -161,7 +161,6 @@ extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
#endif
void (*QAbstractDeclarativeData::destroyed)(QAbstractDeclarativeData *, QObject *) = 0;
-void (*QAbstractDeclarativeData::destroyed_qml1)(QAbstractDeclarativeData *, QObject *) = 0;
void (*QAbstractDeclarativeData::parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *) = 0;
void (*QAbstractDeclarativeData::signalEmitted)(QAbstractDeclarativeData *, QObject *, int, void **) = 0;
int (*QAbstractDeclarativeData::receivers)(QAbstractDeclarativeData *, const QObject *, int) = 0;
@@ -233,10 +232,6 @@ QObjectPrivate::~QObjectPrivate()
if (metaObject) metaObject->objectDestroyed(q_ptr);
-#ifndef QT_NO_USERDATA
- if (extraData)
- qDeleteAll(extraData->userData);
-#endif
delete extraData;
}
@@ -995,15 +990,8 @@ QObject::~QObject()
emit destroyed(this);
}
- if (d->declarativeData) {
- if (static_cast<QAbstractDeclarativeDataImpl*>(d->declarativeData)->ownedByQml1) {
- if (QAbstractDeclarativeData::destroyed_qml1)
- QAbstractDeclarativeData::destroyed_qml1(d->declarativeData, this);
- } else {
- if (QAbstractDeclarativeData::destroyed)
- QAbstractDeclarativeData::destroyed(d->declarativeData, this);
- }
- }
+ if (d->declarativeData && QAbstractDeclarativeData::destroyed)
+ QAbstractDeclarativeData::destroyed(d->declarativeData, this);
QObjectPrivate::ConnectionData *cd = d->connections.loadRelaxed();
if (cd) {
@@ -4241,58 +4229,6 @@ void QObject::dumpObjectInfo() const
}
}
-#ifndef QT_NO_USERDATA
-static QBasicAtomicInteger<uint> user_data_registration = Q_BASIC_ATOMIC_INITIALIZER(0);
-
-/*!
- \internal
- */
-uint QObject::registerUserData()
-{
- return user_data_registration.fetchAndAddRelaxed(1);
-}
-
-/*!
- \fn QObjectUserData::QObjectUserData()
- \internal
- */
-
-/*!
- \internal
- */
-QObjectUserData::~QObjectUserData()
-{
-}
-
-/*!
- \internal
- */
-void QObject::setUserData(uint id, QObjectUserData* data)
-{
- Q_D(QObject);
- if (!d->extraData)
- d->extraData = new QObjectPrivate::ExtraData;
-
- if (d->extraData->userData.size() <= (int) id)
- d->extraData->userData.resize((int) id + 1);
- d->extraData->userData[id] = data;
-}
-
-/*!
- \internal
- */
-QObjectUserData* QObject::userData(uint id) const
-{
- Q_D(const QObject);
- if (!d->extraData)
- return 0;
- if ((int)id < d->extraData->userData.size())
- return d->extraData->userData.at(id);
- return 0;
-}
-
-#endif // QT_NO_USERDATA
-
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QObject *o)