forked from qt-creator/qt-creator
QmlEngineDebugClient: Simplify the client and utility classes
Change-Id: I86033bdbdef94c6f17e706f8e13ce390969171c6 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -182,15 +182,15 @@ void QmlJSInspectorClient::setCurrentObjects(const QList<int> &debugIds)
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
void recurseObjectIdList(const QDeclarativeDebugObjectReference &ref, QList<int> &debugIds, QList<QString> &objectIds)
|
||||
void recurseObjectIdList(const QmlDebugObjectReference &ref, QList<int> &debugIds, QList<QString> &objectIds)
|
||||
{
|
||||
debugIds << ref.debugId();
|
||||
objectIds << ref.idString();
|
||||
foreach (const QDeclarativeDebugObjectReference &child, ref.children())
|
||||
foreach (const QmlDebugObjectReference &child, ref.children())
|
||||
recurseObjectIdList(child, debugIds, objectIds);
|
||||
}
|
||||
|
||||
void QmlJSInspectorClient::setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots)
|
||||
void QmlJSInspectorClient::setObjectIdList(const QList<QmlDebugObjectReference> &objectRoots)
|
||||
{
|
||||
QByteArray message;
|
||||
QDataStream ds(&message, QIODevice::WriteOnly);
|
||||
@@ -198,7 +198,7 @@ void QmlJSInspectorClient::setObjectIdList(const QList<QDeclarativeDebugObjectRe
|
||||
QList<int> debugIds;
|
||||
QList<QString> objectIds;
|
||||
|
||||
foreach (const QDeclarativeDebugObjectReference &ref, objectRoots)
|
||||
foreach (const QmlDebugObjectReference &ref, objectRoots)
|
||||
recurseObjectIdList(ref, debugIds, objectIds);
|
||||
|
||||
InspectorProtocol::Message cmd = InspectorProtocol::ObjectIdList;
|
||||
|
||||
Reference in New Issue
Block a user