diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-12 05:30:17 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-03-12 05:30:17 (GMT) |
commit | e16cc0cf7e50a63674a7e36169d0844af6ddb2ce (patch) | |
tree | 04a3f8466c2985a7be19913be1d1547f6e117432 /src/declarative/qml/qdeclarativeenginedebug.cpp | |
parent | 58fcfaecd1ce82ef19feb25eca8b3bf2f3f3d4c1 (diff) | |
download | Qt-e16cc0cf7e50a63674a7e36169d0844af6ddb2ce.zip Qt-e16cc0cf7e50a63674a7e36169d0844af6ddb2ce.tar.gz Qt-e16cc0cf7e50a63674a7e36169d0844af6ddb2ce.tar.bz2 |
Optimization: Use linked list for context children
Diffstat (limited to 'src/declarative/qml/qdeclarativeenginedebug.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeenginedebug.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 3e4acbe..933683c 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -230,22 +230,22 @@ void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, int count = 0; - for (QSet<QDeclarativeContext *>::ConstIterator iter = p->childContexts.begin(); - iter != p->childContexts.end(); ++iter) { - QDeclarativeContextPrivate *p = (QDeclarativeContextPrivate *)QObjectPrivate::get(*iter); - if (p->isInternal) - continue; - ++count; + QDeclarativeContext *child = p->childContexts; + while (child) { + QDeclarativeContextPrivate *p = QDeclarativeContextPrivate::get(child); + if (!p->isInternal) + ++count; + child = p->nextChild; } message << count; - for (QSet<QDeclarativeContext *>::ConstIterator iter = p->childContexts.begin(); - iter != p->childContexts.end(); ++iter) { - QDeclarativeContextPrivate *p = (QDeclarativeContextPrivate *)QObjectPrivate::get(*iter); - if (p->isInternal) - continue; - buildObjectList(message, *iter); + child = p->childContexts; + while (child) { + QDeclarativeContextPrivate *p = QDeclarativeContextPrivate::get(child); + if (!p->isInternal) + buildObjectList(message, child); + child = p->nextChild; } // Clean deleted objects |