QmlJSDebugger: Code cosmetics

This commit is contained in:
Thorbjørn Lindeijer
2011-02-24 17:52:35 +01:00
parent 603e7ade3f
commit ec92b3b2c0
3 changed files with 9 additions and 12 deletions

View File

@@ -51,7 +51,6 @@ AbstractLiveEditTool::AbstractLiveEditTool(QDeclarativeViewObserver *editorView)
AbstractLiveEditTool::~AbstractLiveEditTool()
{
}
QDeclarativeViewObserver *AbstractLiveEditTool::observer() const
@@ -196,4 +195,4 @@ QString AbstractLiveEditTool::titleForItem(QGraphicsItem *item)
}
}
} // namespace QmlJSDebugger

View File

@@ -81,10 +81,9 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message)
for (int i = 0; i < objectCount; ++i) {
int debugId;
ds >> debugId;
if (debugId != -1) {
if (debugId != -1)
m_currentDebugIds << debugId;
}
}
emit currentObjectsChanged(m_currentDebugIds);
break;
@@ -166,7 +165,8 @@ QList<int> QmlJSObserverClient::currentObjects() const
return m_currentDebugIds;
}
void QmlJSObserverClient::setCurrentObjects(const QList<int> &debugIds) {
void QmlJSObserverClient::setCurrentObjects(const QList<int> &debugIds)
{
if (!m_connection || !m_connection->isConnected())
return;
@@ -195,10 +195,9 @@ void recurseObjectIdList(const QDeclarativeDebugObjectReference &ref, QList<int>
{
debugIds << ref.debugId();
objectIds << ref.idString();
foreach(const QDeclarativeDebugObjectReference &child, ref.children()) {
foreach (const QDeclarativeDebugObjectReference &child, ref.children())
recurseObjectIdList(child, debugIds, objectIds);
}
}
void QmlJSObserverClient::setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots)
{
@@ -208,9 +207,8 @@ void QmlJSObserverClient::setObjectIdList(const QList<QDeclarativeDebugObjectRef
QList<int> debugIds;
QList<QString> objectIds;
foreach(const QDeclarativeDebugObjectReference &ref, objectRoots) {
foreach (const QDeclarativeDebugObjectReference &ref, objectRoots)
recurseObjectIdList(ref, debugIds, objectIds);
}
ObserverProtocol::Message cmd = ObserverProtocol::ObjectIdList;
ds << cmd