summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-29 08:53:38 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-29 09:05:00 (GMT)
commit4c47079d367d44cf18b91965c351a5e9d834b343 (patch)
tree82e3ba76500f4d346badd7091d1187114fb4cf93 /src/declarative/qml/qdeclarativeengine.cpp
parent20290c189bf00fc457ec7d1f82708a8df83adbc5 (diff)
downloadQt-4c47079d367d44cf18b91965c351a5e9d834b343.zip
Qt-4c47079d367d44cf18b91965c351a5e9d834b343.tar.gz
Qt-4c47079d367d44cf18b91965c351a5e9d834b343.tar.bz2
Simplify QDeclarativeGuard logic
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 19d4b57..8992d50 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -870,14 +870,10 @@ void QDeclarativeData::destroyed(QObject *object)
if (ownContext && context)
context->destroy();
- QDeclarativeGuard<QObject> *guard = guards;
- while (guard) {
- QDeclarativeGuard<QObject> *g = guard;
- guard = guard->next;
- g->o = 0;
- g->prev = 0;
- g->next = 0;
- g->objectDestroyed(object);
+ while (guards) {
+ QDeclarativeGuard<QObject> *guard = guards;
+ *guard = (QObject *)0;
+ guard->objectDestroyed(object);
}
if (scriptValue)