diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-29 08:53:38 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-29 09:05:00 (GMT) |
commit | 4c47079d367d44cf18b91965c351a5e9d834b343 (patch) | |
tree | 82e3ba76500f4d346badd7091d1187114fb4cf93 /src/declarative/qml/qdeclarativeengine.cpp | |
parent | 20290c189bf00fc457ec7d1f82708a8df83adbc5 (diff) | |
download | Qt-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.cpp | 12 |
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) |