Debugger: Fix indentation & trailing whitespace
authorKai Koehne <kai.koehne@nokia.com>
Wed, 31 Aug 2011 07:15:05 +0000 (09:15 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 2 Sep 2011 11:13:21 +0000 (13:13 +0200)
Change-Id: I4b85b205a359e4c3adc1fcb6682945724a0910c5
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Reviewed-on: http://codereview.qt.nokia.com/3937
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
src/declarative/debugger/qdeclarativedebugclient.cpp
src/declarative/debugger/qdeclarativedebugserver.cpp
src/declarative/debugger/qdeclarativedebugservice.cpp
src/declarative/debugger/qdeclarativedebugtrace.cpp
src/declarative/debugger/qdeclarativeenginedebug.cpp
src/declarative/debugger/qdeclarativeenginedebug_p.h
src/declarative/debugger/qdeclarativeenginedebugservice.cpp
src/declarative/debugger/qpacketprotocol.cpp
src/declarative/debugger/qpacketprotocol_p.h

index d3617b1..9853a9f 100644 (file)
@@ -84,7 +84,7 @@ public Q_SLOTS:
 };
 
 QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarativeDebugConnection *c)
-: QObject(c), q(c), protocol(0), gotHello(false)
+    : QObject(c), q(c), protocol(0), gotHello(false)
 {
     protocol = new QPacketProtocol(q, this);
     QObject::connect(c, SIGNAL(connected()), this, SLOT(connected()));
@@ -183,7 +183,7 @@ void QDeclarativeDebugConnectionPrivate::readyRead()
             pack >> message;
 
             QHash<QString, QDeclarativeDebugClient *>::Iterator iter =
-                plugins.find(name);
+                    plugins.find(name);
             if (iter == plugins.end()) {
                 qWarning() << "QDeclarativeDebugConnection: Message received for missing plugin" << name;
             } else {
@@ -194,7 +194,7 @@ void QDeclarativeDebugConnectionPrivate::readyRead()
 }
 
 QDeclarativeDebugConnection::QDeclarativeDebugConnection(QObject *parent)
-: QTcpSocket(parent), d(new QDeclarativeDebugConnectionPrivate(this))
+    : QTcpSocket(parent), d(new QDeclarativeDebugConnectionPrivate(this))
 {
 }
 
@@ -202,8 +202,8 @@ QDeclarativeDebugConnection::~QDeclarativeDebugConnection()
 {
     QHash<QString, QDeclarativeDebugClient*>::iterator iter = d->plugins.begin();
     for (; iter != d->plugins.end(); ++iter) {
-         iter.value()->d_func()->connection = 0;
-         iter.value()->statusChanged(QDeclarativeDebugClient::NotConnected);
+        iter.value()->d_func()->connection = 0;
+        iter.value()->statusChanged(QDeclarativeDebugClient::NotConnected);
     }
 }
 
@@ -213,13 +213,13 @@ bool QDeclarativeDebugConnection::isConnected() const
 }
 
 QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate()
-: connection(0)
+    : connection(0)
 {
 }
 
 QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, 
-                                           QDeclarativeDebugConnection *parent)
-: QObject(*(new QDeclarativeDebugClientPrivate), parent)
+                                                 QDeclarativeDebugConnection *parent)
+    : QObject(*(new QDeclarativeDebugClientPrivate), parent)
 {
     Q_D(QDeclarativeDebugClient);
     d->name = name;
index e7785d0..1963dce 100644 (file)
@@ -120,7 +120,7 @@ void QDeclarativeDebugServerPrivate::advertisePlugins()
 }
 
 QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin(
-    const QString &pluginName)
+        const QString &pluginName)
 {
     QStringList pluginCandidates;
     const QStringList paths = QCoreApplication::libraryPaths();
@@ -178,9 +178,9 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
         if (!appD->qmljsDebugArgumentsString().isEmpty()) {
             if (!QDeclarativeEnginePrivate::qml_debugging_enabled) {
                 const QString message =
-                    QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
-                              "Debugging has not been enabled.").arg(
-                                  appD->qmljsDebugArgumentsString());
+                        QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". "
+                                           "Debugging has not been enabled.").arg(
+                            appD->qmljsDebugArgumentsString());
                 qWarning("%s", qPrintable(message));
                 return 0;
             }
@@ -231,7 +231,7 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance()
 }
 
 QDeclarativeDebugServer::QDeclarativeDebugServer()
-: QObject(*(new QDeclarativeDebugServerPrivate))
+    : QObject(*(new QDeclarativeDebugServerPrivate))
 {
 }
 
index 7274211..ecd9e0f 100644 (file)
 QT_BEGIN_NAMESPACE
 
 QDeclarativeDebugServicePrivate::QDeclarativeDebugServicePrivate()
-: server(0)
+    : server(0)
 {
 }
 
 QDeclarativeDebugService::QDeclarativeDebugService(const QString &name, QObject *parent)
-: QObject(*(new QDeclarativeDebugServicePrivate), parent)
+    : QObject(*(new QDeclarativeDebugServicePrivate), parent)
 {
     Q_D(QDeclarativeDebugService);
     d->name = name;
@@ -114,21 +114,21 @@ QDeclarativeDebugService::Status QDeclarativeDebugService::status() const
 
 namespace {
 
-    struct ObjectReference 
-    {
-        QPointer<QObject> object;
-        int id;
-    };
+struct ObjectReference
+{
+    QPointer<QObject> object;
+    int id;
+};
 
-    struct ObjectReferenceHash 
-    {
-        ObjectReferenceHash() : nextId(0) {}
+struct ObjectReferenceHash
+{
+    ObjectReferenceHash() : nextId(0) {}
 
-        QHash<QObject *, ObjectReference> objects;
-        QHash<int, QObject *> ids;
+    QHash<QObject *, ObjectReference> objects;
+    QHash<int, QObject *> ids;
 
-        int nextId;
-    };
+    int nextId;
+};
 
 }
 Q_GLOBAL_STATIC(ObjectReferenceHash, objectReferenceHash);
@@ -144,8 +144,8 @@ int QDeclarativeDebugService::idForObject(QObject *object)
         return -1;
 
     ObjectReferenceHash *hash = objectReferenceHash();
-    QHash<QObject *, ObjectReference>::Iterator iter = 
-        hash->objects.find(object);
+    QHash<QObject *, ObjectReference>::Iterator iter =
+            hash->objects.find(object);
 
     if (iter == hash->objects.end()) {
         int id = hash->nextId++;
@@ -162,7 +162,7 @@ int QDeclarativeDebugService::idForObject(QObject *object)
         hash->ids.insert(id, object);
         iter->object = object;
         iter->id = id;
-    } 
+    }
     return iter->id;
 }
 
@@ -180,8 +180,8 @@ QObject *QDeclarativeDebugService::objectForId(int id)
         return 0;
 
 
-    QHash<QObject *, ObjectReference>::Iterator objIter = 
-        hash->objects.find(*iter);
+    QHash<QObject *, ObjectReference>::Iterator objIter =
+            hash->objects.find(*iter);
     Q_ASSERT(objIter != hash->objects.end());
 
     if (objIter->object == 0) {
@@ -213,8 +213,8 @@ QString QDeclarativeDebugService::objectToString(QObject *obj)
     if(objectName.isEmpty())
         objectName = QLatin1String("<unnamed>");
 
-    QString rv = QString::fromUtf8(obj->metaObject()->className()) + 
-                 QLatin1String(": ") + objectName;
+    QString rv = QString::fromUtf8(obj->metaObject()->className()) +
+            QLatin1String(": ") + objectName;
 
     return rv;
 }
index 0a46d68..dc1a34d 100644 (file)
@@ -64,8 +64,8 @@ QByteArray QDeclarativeDebugData::toByteArray() const
 }
 
 QDeclarativeDebugTrace::QDeclarativeDebugTrace()
-: QDeclarativeDebugService(QLatin1String("CanvasFrameRate")),
-  m_enabled(false), m_deferredSend(true), m_messageReceived(false)
+    : QDeclarativeDebugService(QLatin1String("CanvasFrameRate")),
+      m_enabled(false), m_deferredSend(true), m_messageReceived(false)
 {
     m_timer.start();
     if (status() == Enabled) {
@@ -77,19 +77,19 @@ QDeclarativeDebugTrace::QDeclarativeDebugTrace()
 
 void QDeclarativeDebugTrace::addEvent(EventType t)
 {
-    if (QDeclarativeDebugService::isDebuggingEnabled()) 
+    if (QDeclarativeDebugService::isDebuggingEnabled())
         traceInstance()->addEventImpl(t);
 }
 
 void QDeclarativeDebugTrace::startRange(RangeType t)
 {
-    if (QDeclarativeDebugService::isDebuggingEnabled()) 
+    if (QDeclarativeDebugService::isDebuggingEnabled())
         traceInstance()->startRangeImpl(t);
 }
 
 void QDeclarativeDebugTrace::rangeData(RangeType t, const QString &data)
 {
-    if (QDeclarativeDebugService::isDebuggingEnabled()) 
+    if (QDeclarativeDebugService::isDebuggingEnabled())
         traceInstance()->rangeDataImpl(t, data);
 }
 
@@ -113,7 +113,7 @@ void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QUrl &fileName, in
 
 void QDeclarativeDebugTrace::endRange(RangeType t)
 {
-    if (QDeclarativeDebugService::isDebuggingEnabled()) 
+    if (QDeclarativeDebugService::isDebuggingEnabled())
         traceInstance()->endRangeImpl(t);
 }
 
index 85ce710..836885d 100644 (file)
@@ -95,8 +95,8 @@ public:
 };
 
 QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client,
-                                           QDeclarativeEngineDebugPrivate *p)
-: QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p)
+                                                             QDeclarativeEngineDebugPrivate *p)
+    : QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p)
 {
 }
 
@@ -113,7 +113,7 @@ void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data)
 }
 
 QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *c)
-: client(new QDeclarativeEngineDebugClient(c, this)), nextId(0)
+    : client(new QDeclarativeEngineDebugClient(c, this)), nextId(0)
 {
 }
 
@@ -172,7 +172,7 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclara
 }
 
 void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, 
-                                   QDeclarativeDebugRootContextQuery *q)
+                                            QDeclarativeDebugRootContextQuery *q)
 {
     if (c && q) {
         QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c);
@@ -205,7 +205,7 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclara
 }
 
 void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o,
-                                   bool simple)
+                                            bool simple)
 {
     QDeclarativeEngineDebugService::QDeclarativeObjectData data;
     ds >> data;
@@ -243,22 +243,22 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb
         prop.m_hasNotifySignal = data.hasNotifySignal;
         prop.m_valueTypeName = data.valueTypeName;
         switch (data.type) {
-            case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic:
-            case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List:
-            case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty:
-            {
-                prop.m_value = data.value;
-                break;
-            }
-            case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Object:
-            {
-                QDeclarativeDebugObjectReference obj;
-                obj.m_debugId = prop.m_value.toInt();
-                prop.m_value = QVariant::fromValue(obj);
-                break;
-            }
-            case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Unknown:
-                break;
+        case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic:
+        case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List:
+        case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty:
+        {
+            prop.m_value = data.value;
+            break;
+        }
+        case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Object:
+        {
+            QDeclarativeDebugObjectReference obj;
+            obj.m_debugId = prop.m_value.toInt();
+            prop.m_value = QVariant::fromValue(obj);
+            break;
+        }
+        case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Unknown:
+            break;
         }
         o.m_properties << prop;
     }
@@ -332,7 +332,7 @@ void QDeclarativeEngineDebugPrivate::message(const QByteArray &data)
             return;
         rootContextQuery.remove(queryId);
 
-        if (!ds.atEnd()) 
+        if (!ds.atEnd())
             decode(ds, query->m_context);
 
         query->m_client = 0;
@@ -411,7 +411,7 @@ void QDeclarativeEngineDebugPrivate::message(const QByteArray &data)
 }
 
 QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent)
-: QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent)
+    : QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent)
 {
 }
 
@@ -580,7 +580,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclar
 
         QByteArray message;
         QDataStream ds(&message, QIODevice::WriteOnly);
-        ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() 
+        ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
            << false << true;
         d->client->sendMessage(message);
     } else {
@@ -603,7 +603,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons
 
         QByteArray message;
         QDataStream ds(&message, QIODevice::WriteOnly);
-        ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() 
+        ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
            << true << true;
         d->client->sendMessage(message);
     } else {
@@ -686,7 +686,7 @@ bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &me
 }
 
 QDeclarativeDebugWatch::QDeclarativeDebugWatch(QObject *parent)
-: QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1)
+    : QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1)
 {
 }
 
@@ -742,7 +742,7 @@ QString QDeclarativeDebugObjectExpressionWatch::expression() const
 
 
 QDeclarativeDebugQuery::QDeclarativeDebugQuery(QObject *parent)
-: QObject(parent), m_state(Waiting)
+    : QObject(parent), m_state(Waiting)
 {
 }
 
@@ -765,13 +765,13 @@ void QDeclarativeDebugQuery::setState(State s)
 }
 
 QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(QObject *parent)
-: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+    : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
 {
 }
 
 QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery()
 {
-    if (m_client && m_queryId != -1) 
+    if (m_client && m_queryId != -1)
         QDeclarativeEngineDebugPrivate::remove(m_client, this);
 }
 
@@ -781,13 +781,13 @@ QList<QDeclarativeDebugEngineReference> QDeclarativeDebugEnginesQuery::engines()
 }
 
 QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(QObject *parent)
-: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+    : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
 {
 }
 
 QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery()
 {
-    if (m_client && m_queryId != -1) 
+    if (m_client && m_queryId != -1)
         QDeclarativeEngineDebugPrivate::remove(m_client, this);
 }
 
@@ -797,13 +797,13 @@ QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext
 }
 
 QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(QObject *parent)
-: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+    : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
 {
 }
 
 QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery()
 {
-    if (m_client && m_queryId != -1) 
+    if (m_client && m_queryId != -1)
         QDeclarativeEngineDebugPrivate::remove(m_client, this);
 }
 
@@ -813,13 +813,13 @@ QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object() const
 }
 
 QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(QObject *parent)
-: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
+    : QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1)
 {
 }
 
 QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery()
 {
-    if (m_client && m_queryId != -1) 
+    if (m_client && m_queryId != -1)
         QDeclarativeEngineDebugPrivate::remove(m_client, this);
 }
 
@@ -834,17 +834,17 @@ QVariant QDeclarativeDebugExpressionQuery::result() const
 }
 
 QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference()
-: m_debugId(-1)
+    : m_debugId(-1)
 {
 }
 
 QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(int debugId)
-: m_debugId(debugId)
+    : m_debugId(debugId)
 {
 }
 
 QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &o)
-: m_debugId(o.m_debugId), m_name(o.m_name)
+    : m_debugId(o.m_debugId), m_name(o.m_name)
 {
 }
 
@@ -866,19 +866,19 @@ QString QDeclarativeDebugEngineReference::name() const
 }
 
 QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference()
-: m_debugId(-1), m_contextDebugId(-1)
+    : m_debugId(-1), m_contextDebugId(-1)
 {
 }
 
 QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int debugId)
-: m_debugId(debugId), m_contextDebugId(-1)
+    : m_debugId(debugId), m_contextDebugId(-1)
 {
 }
 
 QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &o)
-: m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString),
-  m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId),
-  m_properties(o.m_properties), m_children(o.m_children)
+    : m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString),
+      m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId),
+      m_properties(o.m_properties), m_children(o.m_children)
 {
 }
 
@@ -932,18 +932,18 @@ QList<QDeclarativeDebugObjectReference> QDeclarativeDebugObjectReference::childr
 }
 
 QDeclarativeDebugContextReference::QDeclarativeDebugContextReference()
-: m_debugId(-1)
+    : m_debugId(-1)
 {
 }
 
 QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &o)
-: m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts)
+    : m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts)
 {
 }
 
 QDeclarativeDebugContextReference &QDeclarativeDebugContextReference::operator=(const QDeclarativeDebugContextReference &o)
 {
-    m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects; 
+    m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects;
     m_contexts = o.m_contexts;
     return *this;
 }
@@ -969,12 +969,12 @@ QList<QDeclarativeDebugContextReference> QDeclarativeDebugContextReference::cont
 }
 
 QDeclarativeDebugFileReference::QDeclarativeDebugFileReference()
-: m_lineNumber(-1), m_columnNumber(-1)
+    : m_lineNumber(-1), m_columnNumber(-1)
 {
 }
 
 QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &o)
-: m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber)
+    : m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber)
 {
 }
 
@@ -1015,14 +1015,14 @@ void QDeclarativeDebugFileReference::setColumnNumber(int c)
 }
 
 QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference()
-: m_objectDebugId(-1), m_hasNotifySignal(false)
+    : m_objectDebugId(-1), m_hasNotifySignal(false)
 {
 }
 
 QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &o)
-: m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value),
-  m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding),
-  m_hasNotifySignal(o.m_hasNotifySignal)
+    : m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value),
+      m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding),
+      m_hasNotifySignal(o.m_hasNotifySignal)
 {
 }
 
index 9b70e1c..24d0d85 100644 (file)
@@ -38,6 +38,7 @@
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
+
 #ifndef QDECLARATIVEENGINEDEBUG_H
 #define QDECLARATIVEENGINEDEBUG_H
 
@@ -69,7 +70,7 @@ class QDeclarativeDebugEngineReference;
 class QDeclarativeEngineDebugPrivate;
 class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebug : public QObject
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     enum Status { NotConnected, Unavailable, Enabled };
 
@@ -78,28 +79,28 @@ public:
     Status status() const;
 
     QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &,
-                            QObject *parent = 0);
+                                             QObject *parent = 0);
     QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugContextReference &, const QString &,
-                            QObject *parent = 0);
+                                     QObject *parent = 0);
     QDeclarativeDebugObjectExpressionWatch *addWatch(const QDeclarativeDebugObjectReference &, const QString &,
-                            QObject *parent = 0);
+                                                     QObject *parent = 0);
     QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugObjectReference &,
-                            QObject *parent = 0);
+                                     QObject *parent = 0);
     QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugFileReference &,
-                            QObject *parent = 0);
+                                     QObject *parent = 0);
 
     void removeWatch(QDeclarativeDebugWatch *watch);
 
     QDeclarativeDebugEnginesQuery *queryAvailableEngines(QObject *parent = 0);
     QDeclarativeDebugRootContextQuery *queryRootContexts(const QDeclarativeDebugEngineReference &,
-                                                QObject *parent = 0);
-    QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &, 
-                                     QObject *parent = 0);
-    QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &, 
+                                                         QObject *parent = 0);
+    QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &,
                                               QObject *parent = 0);
-    QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId, 
-                                                   const QString &expr,
-                                                   QObject *parent = 0);
+    QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &,
+                                                       QObject *parent = 0);
+    QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId,
+                                                            const QString &expr,
+                                                            QObject *parent = 0);
     bool setBindingForObject(int objectDebugId, const QString &propertyName,
                              const QVariant &bindingExpression, bool isLiteralValue,
                              QString source = QString(), int line = -1);
@@ -116,7 +117,7 @@ private:
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugWatch : public QObject
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     enum State { Waiting, Active, Inactive, Dead };
 
@@ -175,14 +176,14 @@ private:
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugQuery : public QObject
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     enum State { Waiting, Error, Completed };
 
     State state() const;
     bool isWaiting() const;
 
-//    bool waitUntilCompleted();
+    //    bool waitUntilCompleted();
 
 Q_SIGNALS:
     void stateChanged(QDeclarativeDebugQuery::State);
@@ -314,7 +315,7 @@ private:
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     virtual ~QDeclarativeDebugEnginesQuery();
     QList<QDeclarativeDebugEngineReference> engines() const;
@@ -329,7 +330,7 @@ private:
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     virtual ~QDeclarativeDebugRootContextQuery();
     QDeclarativeDebugContextReference rootContext() const;
@@ -344,7 +345,7 @@ private:
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     virtual ~QDeclarativeDebugObjectQuery();
     QDeclarativeDebugObjectReference object() const;
@@ -360,7 +361,7 @@ private:
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     virtual ~QDeclarativeDebugExpressionQuery();
     QVariant expression() const;
index 2e5683c..9841f87 100644 (file)
@@ -67,8 +67,8 @@ QDeclarativeEngineDebugService *QDeclarativeEngineDebugService::instance()
 }
 
 QDeclarativeEngineDebugService::QDeclarativeEngineDebugService(QObject *parent)
-: QDeclarativeDebugService(QLatin1String("QDeclarativeEngine"), parent),
-    m_watch(new QDeclarativeWatcher(this))
+    : QDeclarativeDebugService(QLatin1String("QDeclarativeEngine"), parent),
+      m_watch(new QDeclarativeWatcher(this))
 {
     QObject::connect(m_watch, SIGNAL(propertyChanged(int,int,QMetaProperty,QVariant)),
                      this, SLOT(propertyChanged(int,int,QMetaProperty,QVariant)));
@@ -112,7 +112,7 @@ static inline bool isSignalPropertyName(const QString &signalName)
 {
     // see QmlCompiler::isSignalPropertyName
     return signalName.length() >= 3 && signalName.startsWith(QLatin1String("on")) &&
-           signalName.at(2).isLetter() && signalName.at(2).isUpper();
+            signalName.at(2).isLetter() && signalName.at(2).isUpper();
 }
 
 static bool hasValidSignal(QObject *object, const QString &propertyName)
@@ -142,8 +142,8 @@ QDeclarativeEngineDebugService::propertyData(QObject *obj, int propIdx)
     rv.valueTypeName = QString::fromUtf8(prop.typeName());
     rv.name = QString::fromUtf8(prop.name());
     rv.hasNotifySignal = prop.hasNotifySignal();
-    QDeclarativeAbstractBinding *binding = 
-        QDeclarativePropertyPrivate::binding(QDeclarativeProperty(obj, rv.name));
+    QDeclarativeAbstractBinding *binding =
+            QDeclarativePropertyPrivate::binding(QDeclarativeProperty(obj, rv.name));
     if (binding)
         rv.binding = binding->expression();
 
@@ -193,8 +193,8 @@ QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) co
     return QLatin1String("<unknown value>");
 }
 
-void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message,
-                                           QObject *object, bool recur, bool dumpProperties)
+void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message, 
+                                                     QObject *object, bool recur, bool dumpProperties)
 {
     message << objectData(object);
 
@@ -283,7 +283,7 @@ void QDeclarativeEngineDebugService::buildObjectList(QDataStream &message, QDecl
     QString ctxtName = ctxt->objectName();
     int ctxtId = QDeclarativeDebugService::idForObject(ctxt);
 
-    message << ctxtName << ctxtId; 
+    message << ctxtName << ctxtId;
 
     int count = 0;
 
@@ -336,7 +336,7 @@ void QDeclarativeEngineDebugService::buildStatesList(QDeclarativeContext *ctxt,
 void QDeclarativeEngineDebugService::buildStatesList(QObject *obj)
 {
     if (QDeclarativeState *state = qobject_cast<QDeclarativeState *>(obj)) {
-            m_allStates.append(state);
+        m_allStates.append(state);
     }
 
     QObjectList children = obj->children();
@@ -416,8 +416,8 @@ void QDeclarativeEngineDebugService::messageReceived(const QByteArray &message)
         int engineId = -1;
         ds >> queryId >> engineId;
 
-        QDeclarativeEngine *engine = 
-            qobject_cast<QDeclarativeEngine *>(QDeclarativeDebugService::objectForId(engineId));
+        QDeclarativeEngine *engine =
+                qobject_cast<QDeclarativeEngine *>(QDeclarativeDebugService::objectForId(engineId));
 
         QByteArray reply;
         QDataStream rs(&reply, QIODevice::WriteOnly);
@@ -546,11 +546,11 @@ void QDeclarativeEngineDebugService::messageReceived(const QByteArray &message)
 }
 
 void QDeclarativeEngineDebugService::setBinding(int objectId,
-                                               const QString &propertyName,
-                                               const QVariant &expression,
-                                               bool isLiteralValue,
-                                               QString filename,
-                                               int line)
+                                                const QString &propertyName,
+                                                const QVariant &expression,
+                                                bool isLiteralValue,
+                                                QString filename,
+                                                int line)
 {
     QObject *object = objectForId(objectId);
     QDeclarativeContext *context = qmlContext(object);
@@ -656,7 +656,7 @@ void QDeclarativeEngineDebugService::resetBinding(int objectId, const QString &p
         } else if (hasValidSignal(object, propertyName)) {
             QDeclarativeProperty property(object, propertyName, context);
             QDeclarativePropertyPrivate::setSignalExpression(property, 0);
-    } else {
+        } else {
             if (QDeclarativePropertyChanges *propertyChanges = qobject_cast<QDeclarativePropertyChanges *>(object)) {
                 propertyChanges->removeProperty(propertyName);
             }
@@ -675,8 +675,8 @@ void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString &
         return;
 
     QDeclarativePropertyCache::Data dummy;
-    QDeclarativePropertyCache::Data *prop = 
-        QDeclarativePropertyCache::property(context->engine(), object, method, dummy);
+    QDeclarativePropertyCache::Data *prop =
+            QDeclarativePropertyCache::property(context->engine(), object, method, dummy);
 
     if (!prop || !prop->isVMEFunction())
         return;
@@ -690,13 +690,13 @@ void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString &
         paramStr.append(QString::fromUtf8(paramNames.at(ii)));
     }
 
-    QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr + 
-                         QLatin1String(") {");
+    QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr +
+            QLatin1String(") {");
     jsfunction += body;
     jsfunction += QLatin1String("\n})");
 
-    QDeclarativeVMEMetaObject *vmeMetaObject = 
-        static_cast<QDeclarativeVMEMetaObject*>(QObjectPrivate::get(object)->metaObject);
+    QDeclarativeVMEMetaObject *vmeMetaObject =
+            static_cast<QDeclarativeVMEMetaObject*>(QObjectPrivate::get(object)->metaObject);
     Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this
 
     int lineNumber = vmeMetaObject->vmeMethodLineNumber(prop->coreIndex);
index 9caaa79..0f1c15e 100644 (file)
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
   \brief The QPacketProtocol class encapsulates communicating discrete packets
   across fragmented IO channels, such as TCP sockets.
 
-  QPacketProtocol makes it simple to send arbitrary sized data "packets" across 
+  QPacketProtocol makes it simple to send arbitrary sized data "packets" across
   fragmented transports such as TCP and UDP.
 
   As transmission boundaries are not respected, sending packets over protocols
@@ -111,11 +111,11 @@ QT_BEGIN_NAMESPACE
 
 class QPacketProtocolPrivate : public QObject
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     QPacketProtocolPrivate(QPacketProtocol * parent, QIODevice * _dev)
-    : QObject(parent), inProgressSize(-1), maxPacketSize(MAX_PACKET_SIZE),
-      waitingForPacket(false), dev(_dev)
+        : QObject(parent), inProgressSize(-1), maxPacketSize(MAX_PACKET_SIZE),
+          waitingForPacket(false), dev(_dev)
     {
         Q_ASSERT(4 == sizeof(qint32));
 
@@ -222,7 +222,7 @@ public:
   specified \a parent.
  */
 QPacketProtocol::QPacketProtocol(QIODevice * dev, QObject * parent)
-: QObject(parent), d(new QPacketProtocolPrivate(this, dev))
+    : QObject(parent), d(new QPacketProtocolPrivate(this, dev))
 {
     Q_ASSERT(dev);
 }
@@ -236,7 +236,7 @@ QPacketProtocol::~QPacketProtocol()
 
 /*!
   Returns the maximum packet size allowed.  By default this is
-  2,147,483,647 bytes.  
+  2,147,483,647 bytes.
   
   If a packet claiming to be larger than the maximum packet size is received,
   the QPacketProtocol::invalidPacket() signal is emitted.
@@ -267,7 +267,7 @@ qint32 QPacketProtocol::setMaximumPacketSize(qint32 max)
   protocol.send() << "Hello world" << 123;
   \endcode
 
-  will send a packet containing "Hello world" and 123.  To construct more 
+  will send a packet containing "Hello world" and 123.  To construct more
   complex packets, explicitly construct a QPacket instance.
  */
 QPacketAutoSend QPacketProtocol::send()
@@ -433,8 +433,8 @@ QIODevice * QPacketProtocol::device()
   \endcode
 
   Only packets returned from QPacketProtocol::read() may be read from.  QPacket
-  instances constructed by directly by applications are for transmission only 
-  and are considered "write only".  Attempting to read data from them will 
+  instances constructed by directly by applications are for transmission only
+  and are considered "write only".  Attempting to read data from them will
   result in undefined behavior.
 
   \ingroup io
@@ -445,7 +445,7 @@ QIODevice * QPacketProtocol::device()
   Constructs an empty write-only packet.
   */
 QPacket::QPacket()
-: QDataStream(), buf(0)
+    : QDataStream(), buf(0)
 {
     buf = new QBuffer(&b);
     buf->open(QIODevice::WriteOnly);
@@ -469,7 +469,7 @@ QPacket::~QPacket()
   two packets are otherwise independent.
  */
 QPacket::QPacket(const QPacket & other)
-: QDataStream(), b(other.b), buf(0)
+    : QDataStream(), b(other.b), buf(0)
 {
     buf = new QBuffer(&b);
     buf->open(other.buf->openMode());
@@ -480,7 +480,7 @@ QPacket::QPacket(const QPacket & other)
   \internal
   */
 QPacket::QPacket(const QByteArray & ba)
-: QDataStream(), b(ba), buf(0)
+    : QDataStream(), b(ba), buf(0)
 {
     buf = new QBuffer(&b);
     buf->open(QIODevice::ReadOnly);
@@ -535,7 +535,7 @@ void QPacket::clear()
   \internal
   */
 QPacketAutoSend::QPacketAutoSend(QPacketProtocol * _p)
-: QPacket(), p(_p)
+    : QPacket(), p(_p)
 {
 }
 
index df3b170..9035d12 100644 (file)
@@ -61,7 +61,7 @@ class QPacketProtocolPrivate;
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject
 {
-Q_OBJECT
+    Q_OBJECT
 public:
     explicit QPacketProtocol(QIODevice * dev, QObject * parent = 0);
     virtual ~QPacketProtocol();