summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-01 05:29:26 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-01 05:29:26 (GMT)
commit8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6 (patch)
tree691fe48f981f40f2d50790ceeb7d3719799d9b82 /src/corelib/kernel/qobject.cpp
parentb1748ec7a9fdcd74fcf05af3903623c7165420ad (diff)
downloadQt-8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6.zip
Qt-8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6.tar.gz
Qt-8e87197c2afa19df1fb15cb9b6b3cc17c3d4c0d6.tar.bz2
Optimization: Improve allocation strategy for QDeclarativeDeclarativeData
This improves the declarative/creation/itemtree_qml benchmark by 6%
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index dbc6be2..dfd6a08 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -125,8 +125,10 @@ extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
}
}
+void (*QDeclarativeData::destroyed)(QDeclarativeData *, QObject *) = 0;
+void (*QDeclarativeData::parentChanged)(QDeclarativeData *, QObject *, QObject *) = 0;
+
QObjectData::~QObjectData() {}
-QDeclarativeData::~QDeclarativeData() {}
QObjectPrivate::QObjectPrivate(int version)
: threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0)
@@ -876,7 +878,7 @@ QObject::~QObject()
}
if (d->declarativeData)
- d->declarativeData->destroyed(this);
+ QDeclarativeData::destroyed(d->declarativeData, this);
{
QMutex *signalSlotMutex = 0;
@@ -2025,7 +2027,7 @@ void QObjectPrivate::setParent_helper(QObject *o)
}
}
if (!wasDeleted && declarativeData)
- declarativeData->parentChanged(q, o);
+ QDeclarativeData::parentChanged(declarativeData, q, o);
}
/*!