forked from qt-creator/qt-creator
update object tree when unknown debug id is received
This commit is contained in:
committed by
Olivier Goffart
parent
6532fe5c28
commit
4a4fc8584f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user