Debugger: Fixing coding style issues
authorKai Koehne <kai.koehne@nokia.com>
Wed, 31 Aug 2011 10:38:54 +0000 (12:38 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 2 Sep 2011 11:13:21 +0000 (13:13 +0200)
Applying changes done in the Qt Creator copies.

Change-Id: I11e0547ddedd2e1f0b99d0ea586a1b209fa8d912
Reviewed-on: http://codereview.qt.nokia.com/3942
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
src/declarative/debugger/qdeclarativeenginedebug.cpp
src/declarative/debugger/qdeclarativeenginedebug_p.h
src/declarative/debugger/qpacketprotocol.cpp
src/declarative/debugger/qpacketprotocol_p.h

index 836885d..237e2d6 100644 (file)
@@ -415,6 +415,10 @@ QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *cl
 {
 }
 
+QDeclarativeEngineDebug::~QDeclarativeEngineDebug()
+{
+}
+
 QDeclarativeEngineDebug::Status QDeclarativeEngineDebug::status() const
 {
     Q_D(const QDeclarativeEngineDebug);
index 2cc6bfb..d98e4e8 100644 (file)
@@ -86,6 +86,7 @@ public:
     enum Status { NotConnected, Unavailable, Enabled };
 
     explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0);
+    ~QDeclarativeEngineDebug();
 
     Status status() const;
 
@@ -194,8 +195,6 @@ public:
     State state() const;
     bool isWaiting() const;
 
-    //    bool waitUntilCompleted();
-
 Q_SIGNALS:
     void stateChanged(QDeclarativeDebugQuery::State);
 
index 0f1c15e..9b95d06 100644 (file)
 
 #include "private/qpacketprotocol_p.h"
 
-#include <QBuffer>
-#include <QElapsedTimer>
+#include <QtCore/QBuffer>
+#include <QtCore/QElapsedTimer>
 
 QT_BEGIN_NAMESPACE
 
-#define MAX_PACKET_SIZE 0x7FFFFFFF
+static const unsigned int MAX_PACKET_SIZE = 0x7FFFFFFF;
 
 /*!
   \class QPacketProtocol
@@ -113,7 +113,7 @@ class QPacketProtocolPrivate : public QObject
 {
     Q_OBJECT
 public:
-    QPacketProtocolPrivate(QPacketProtocol * parent, QIODevice * _dev)
+    QPacketProtocolPrivate(QPacketProtocol *parent, QIODevice *_dev)
         : QObject(parent), inProgressSize(-1), maxPacketSize(MAX_PACKET_SIZE),
           waitingForPacket(false), dev(_dev)
     {
@@ -150,8 +150,8 @@ public Q_SLOTS:
     {
         Q_ASSERT(!sendingPackets.isEmpty());
 
-        while(bytes) {
-            if(sendingPackets.at(0) > bytes) {
+        while (bytes) {
+            if (sendingPackets.at(0) > bytes) {
                 sendingPackets[0] -= bytes;
                 bytes = 0;
             } else {
@@ -214,14 +214,14 @@ public:
     qint32 inProgressSize;
     qint32 maxPacketSize;
     bool waitingForPacket;
-    QIODevice * dev;
+    QIODevice *dev;
 };
 
 /*!
   Construct a QPacketProtocol instance that works on \a dev with the
   specified \a parent.
  */
-QPacketProtocol::QPacketProtocol(QIODevice * dev, QObject * parent)
+QPacketProtocol::QPacketProtocol(QIODevice *dev, QObject *parent)
     : QObject(parent), d(new QPacketProtocolPrivate(this, dev))
 {
     Q_ASSERT(dev);
@@ -255,7 +255,7 @@ qint32 QPacketProtocol::maximumPacketSize() const
  */
 qint32 QPacketProtocol::setMaximumPacketSize(qint32 max)
 {
-    if(max > (signed)sizeof(qint32))
+    if (max > (signed)sizeof(qint32))
         d->maxPacketSize = max;
     return d->maxPacketSize;
 }
@@ -282,7 +282,7 @@ QPacketAutoSend QPacketProtocol::send()
  */
 void QPacketProtocol::send(const QPacket & p)
 {
-    if(p.b.isEmpty())
+    if (p.b.isEmpty())
         return; // We don't send empty packets
 
     qint64 sendSize = p.b.size() + sizeof(qint32);
@@ -317,7 +317,7 @@ void QPacketProtocol::clear()
   */
 QPacket QPacketProtocol::read()
 {
-    if(0 == d->packets.count())
+    if (0 == d->packets.count())
         return QPacket();
 
     QPacket rv(d->packets.at(0));
@@ -370,7 +370,7 @@ bool QPacketProtocol::waitForReadyRead(int msecs)
 /*!
   Return the QIODevice passed to the QPacketProtocol constructor.
 */
-QIODevice * QPacketProtocol::device()
+QIODevice *QPacketProtocol::device()
 {
     return d->dev;
 }
@@ -458,7 +458,7 @@ QPacket::QPacket()
   */
 QPacket::~QPacket()
 {
-    if(buf) {
+    if (buf) {
         delete buf;
         buf = 0;
     }
@@ -534,14 +534,14 @@ void QPacket::clear()
 
   \internal
   */
-QPacketAutoSend::QPacketAutoSend(QPacketProtocol * _p)
+QPacketAutoSend::QPacketAutoSend(QPacketProtocol *_p)
     : QPacket(), p(_p)
 {
 }
 
 QPacketAutoSend::~QPacketAutoSend()
 {
-    if(!b.isEmpty())
+    if (!b.isEmpty())
         p->send(*this);
 }
 
index f7f3060..5d9d820 100644 (file)
@@ -74,7 +74,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject
 {
     Q_OBJECT
 public:
-    explicit QPacketProtocol(QIODevice * dev, QObject * parent = 0);
+    explicit QPacketProtocol(QIODevice *dev, QObject *parent = 0);
     virtual ~QPacketProtocol();
 
     qint32 maximumPacketSize() const;
@@ -90,7 +90,7 @@ public:
 
     void clear();
 
-    QIODevice * device();
+    QIODevice *device();
 
 Q_SIGNALS:
     void readyRead();
@@ -98,7 +98,7 @@ Q_SIGNALS:
     void packetWritten();
 
 private:
-    QPacketProtocolPrivate * d;
+    QPacketProtocolPrivate *d;
 };
 
 
@@ -115,9 +115,9 @@ public:
 
 protected:
     friend class QPacketProtocol;
-    QPacket(const QByteArray & ba);
+    QPacket(const QByteArray &ba);
     QByteArray b;
-    QBuffer * buf;
+    QBuffer *buf;
 };
 
 class Q_DECLARATIVE_PRIVATE_EXPORT QPacketAutoSend : public QPacket
@@ -128,7 +128,7 @@ public:
 private:
     friend class QPacketProtocol;
     QPacketAutoSend(QPacketProtocol *);
-    QPacketProtocol * p;
+    QPacketProtocol *p;
 };
 
 QT_END_NAMESPACE