forked from qt-creator/qt-creator
QmlJSDebugger: Code cosmetics
This commit is contained in:
@@ -51,7 +51,6 @@ AbstractLiveEditTool::AbstractLiveEditTool(QDeclarativeViewObserver *editorView)
|
|||||||
|
|
||||||
AbstractLiveEditTool::~AbstractLiveEditTool()
|
AbstractLiveEditTool::~AbstractLiveEditTool()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QDeclarativeViewObserver *AbstractLiveEditTool::observer() const
|
QDeclarativeViewObserver *AbstractLiveEditTool::observer() const
|
||||||
@@ -196,4 +195,4 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
} // namespace QmlJSDebugger
|
||||||
|
|||||||
@@ -81,10 +81,9 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message)
|
|||||||
for (int i = 0; i < objectCount; ++i) {
|
for (int i = 0; i < objectCount; ++i) {
|
||||||
int debugId;
|
int debugId;
|
||||||
ds >> debugId;
|
ds >> debugId;
|
||||||
if (debugId != -1) {
|
if (debugId != -1)
|
||||||
m_currentDebugIds << debugId;
|
m_currentDebugIds << debugId;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
emit currentObjectsChanged(m_currentDebugIds);
|
emit currentObjectsChanged(m_currentDebugIds);
|
||||||
break;
|
break;
|
||||||
@@ -166,7 +165,8 @@ QList<int> QmlJSObserverClient::currentObjects() const
|
|||||||
return m_currentDebugIds;
|
return m_currentDebugIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSObserverClient::setCurrentObjects(const QList<int> &debugIds) {
|
void QmlJSObserverClient::setCurrentObjects(const QList<int> &debugIds)
|
||||||
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -195,10 +195,9 @@ void recurseObjectIdList(const QDeclarativeDebugObjectReference &ref, QList<int>
|
|||||||
{
|
{
|
||||||
debugIds << ref.debugId();
|
debugIds << ref.debugId();
|
||||||
objectIds << ref.idString();
|
objectIds << ref.idString();
|
||||||
foreach(const QDeclarativeDebugObjectReference &child, ref.children()) {
|
foreach (const QDeclarativeDebugObjectReference &child, ref.children())
|
||||||
recurseObjectIdList(child, debugIds, objectIds);
|
recurseObjectIdList(child, debugIds, objectIds);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void QmlJSObserverClient::setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots)
|
void QmlJSObserverClient::setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots)
|
||||||
{
|
{
|
||||||
@@ -208,9 +207,8 @@ void QmlJSObserverClient::setObjectIdList(const QList<QDeclarativeDebugObjectRef
|
|||||||
QList<int> debugIds;
|
QList<int> debugIds;
|
||||||
QList<QString> objectIds;
|
QList<QString> objectIds;
|
||||||
|
|
||||||
foreach(const QDeclarativeDebugObjectReference &ref, objectRoots) {
|
foreach (const QDeclarativeDebugObjectReference &ref, objectRoots)
|
||||||
recurseObjectIdList(ref, debugIds, objectIds);
|
recurseObjectIdList(ref, debugIds, objectIds);
|
||||||
}
|
|
||||||
|
|
||||||
ObserverProtocol::Message cmd = ObserverProtocol::ObjectIdList;
|
ObserverProtocol::Message cmd = ObserverProtocol::ObjectIdList;
|
||||||
ds << cmd
|
ds << cmd
|
||||||
|
|||||||
Reference in New Issue
Block a user