diff options
author | Christiaan Janssen <christiaan.janssen@nokia.com> | 2010-12-10 10:47:43 (GMT) |
---|---|---|
committer | Christiaan Janssen <christiaan.janssen@nokia.com> | 2010-12-10 10:47:43 (GMT) |
commit | 6541562252cecd102788257022d3cf159954cae8 (patch) | |
tree | ed7c7fdcebfafbcb8c897e58ec302c860b342ef0 /src/declarative/qml/qdeclarativeenginedebug.cpp | |
parent | 5710cc981ae39a018d4c30b2c77f6623713a5bf1 (diff) | |
download | Qt-6541562252cecd102788257022d3cf159954cae8.zip Qt-6541562252cecd102788257022d3cf159954cae8.tar.gz Qt-6541562252cecd102788257022d3cf159954cae8.tar.bz2 |
QmlDebugger: Instantiation of deferred objects moved to the debugger engine
Reviewed-by: Kai Koehne
Diffstat (limited to 'src/declarative/qml/qdeclarativeenginedebug.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeenginedebug.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index bffe681..5f338db 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -192,11 +192,6 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, { message << objectData(object); - // Some children aren't added to an object until particular properties are read - // - e.g. child state objects aren't added until the 'states' property is read - - // but this should only affect internal objects that aren't shown by the - // debugger anyway. - QObjectList children = object->children(); int childrenCount = children.count(); @@ -257,6 +252,18 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, message << fakeProperties[ii]; } +void QDeclarativeEngineDebugServer::prepareDeferredObjects(QObject *obj) +{ + qmlExecuteDeferred(obj); + + QObjectList children = obj->children(); + for (int ii = 0; ii < children.count(); ++ii) { + QObject *child = children.at(ii); + prepareDeferredObjects(child); + } + +} + void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt) { QDeclarativeContextData *p = QDeclarativeContextData::get(ctxt); @@ -393,8 +400,11 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) QDataStream rs(&reply, QIODevice::WriteOnly); rs << QByteArray("FETCH_OBJECT_R") << queryId; - if (object) + if (object) { + if (recurse) + prepareDeferredObjects(object); buildObjectDump(rs, object, recurse, dumpProperties); + } sendMessage(reply); } else if (type == "WATCH_OBJECT") { |