diff options
author | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2011-02-24 17:52:35 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2011-02-25 11:06:03 +0100 |
commit | ec92b3b2c0f67f7ee5f7e284c21b239545c75b7b (patch) | |
tree | eca1d0d62a75b207995daee42821b8e92d53cc46 | |
parent | 603e7ade3fa634e356b00f38eace0f09c08b8c7b (diff) | |
download | qt-creator-ec92b3b2c0f67f7ee5f7e284c21b239545c75b7b.tar.gz |
QmlJSDebugger: Code cosmetics
3 files changed, 9 insertions, 12 deletions
diff --git a/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp b/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp index c742d04cd9..433e18227a 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/abstractliveedittool.cpp @@ -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 diff --git a/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeviewobserver.h b/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeviewobserver.h index a78272c2dc..68c99fbb86 100644 --- a/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeviewobserver.h +++ b/share/qtcreator/qml/qmljsdebugger/include/qdeclarativeviewobserver.h @@ -119,6 +119,6 @@ private: friend class AbstractLiveEditTool; }; -} //namespace QmlJSDebugger +} // namespace QmlJSDebugger #endif // QDECLARATIVEVIEWOBSERVER_H diff --git a/src/plugins/qmljsinspector/qmljsobserverclient.cpp b/src/plugins/qmljsinspector/qmljsobserverclient.cpp index bd19fbb064..4be4171baa 100644 --- a/src/plugins/qmljsinspector/qmljsobserverclient.cpp +++ b/src/plugins/qmljsinspector/qmljsobserverclient.cpp @@ -51,7 +51,7 @@ namespace QmlJSInspector { namespace Internal { QmlJSObserverClient::QmlJSObserverClient(QDeclarativeDebugConnection *client, - QObject * /*parent*/) + QObject * /*parent*/) : QDeclarativeDebugClient(QLatin1String("QDeclarativeObserverMode"), client) , m_connection(client) { @@ -78,12 +78,11 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message) m_currentDebugIds.clear(); - for(int i = 0; i < objectCount; ++i) { + for (int i = 0; i < objectCount; ++i) { int debugId; ds >> debugId; - if (debugId != -1) { + if (debugId != -1) m_currentDebugIds << debugId; - } } emit currentObjectsChanged(m_currentDebugIds); @@ -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,9 +195,8 @@ 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 |