update object tree when unknown debug id is received

This commit is contained in:
Lasse Holmstedt
2010-07-14 14:21:10 +02:00
committed by Olivier Goffart
parent 6532fe5c28
commit 4a4fc8584f
7 changed files with 55 additions and 34 deletions

View File

@@ -61,21 +61,20 @@ void QmlJSDesignDebugClient::messageReceived(const QByteArray &message)
QByteArray type;
ds >> type;
QList<QDeclarativeDebugObjectReference> references;
if (type == "CURRENT_OBJECTS_CHANGED") {
int objectCount;
ds >> objectCount;
QList<int> debugIds;
for(int i = 0; i < objectCount; ++i) {
int debugId;
ds >> debugId;
if (debugId != -1) {
QDeclarativeDebugObjectReference ref = ClientProxy::instance()->objectReferenceForId(debugId);
if (ref.debugId() != -1)
references << ref;
debugIds << debugId;
}
}
emit currentObjectsChanged(references);
emit currentObjectsChanged(debugIds);
} else if (type == "TOOL_CHANGED") {
int toolId;
ds >> toolId;