From a3cfd5cd28c1450796f23a847afde0510171dd23 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 13 Jul 2009 15:35:17 +1000 Subject: Rename classes --- src/declarative/debugger/qmldebug.cpp | 14 +++--- src/declarative/debugger/qmldebug.h | 4 +- src/declarative/debugger/qmldebugclient.cpp | 66 ++++++++++++++--------------- src/declarative/debugger/qmldebugclient.h | 28 ++++++------ tools/qmldebugger/canvasframerate.cpp | 12 +++--- tools/qmldebugger/canvasframerate.h | 4 +- tools/qmldebugger/canvasscene.cpp | 10 ++--- tools/qmldebugger/canvasscene.h | 8 ++-- tools/qmldebugger/engine.cpp | 2 +- tools/qmldebugger/engine.h | 4 +- tools/qmldebugger/main.cpp | 2 +- 11 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/declarative/debugger/qmldebug.cpp b/src/declarative/debugger/qmldebug.cpp index 1808bba..8309ec6 100644 --- a/src/declarative/debugger/qmldebug.cpp +++ b/src/declarative/debugger/qmldebug.cpp @@ -3,10 +3,10 @@ #include #include -class QmlEngineDebugClient : public QmlDebugClientPlugin +class QmlEngineDebugClient : public QmlDebugClient { public: - QmlEngineDebugClient(QmlDebugClient *client, QmlEngineDebugPrivate *p); + QmlEngineDebugClient(QmlDebugConnection *client, QmlEngineDebugPrivate *p); protected: virtual void messageReceived(const QByteArray &); @@ -19,7 +19,7 @@ class QmlEngineDebugPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QmlEngineDebug) public: - QmlEngineDebugPrivate(QmlDebugClient *); + QmlEngineDebugPrivate(QmlDebugConnection *); void message(const QByteArray &); @@ -38,9 +38,9 @@ public: QHash objectQuery; }; -QmlEngineDebugClient::QmlEngineDebugClient(QmlDebugClient *client, +QmlEngineDebugClient::QmlEngineDebugClient(QmlDebugConnection *client, QmlEngineDebugPrivate *p) -: QmlDebugClientPlugin(QLatin1String("QmlEngine"), client), priv(p) +: QmlDebugClient(QLatin1String("QmlEngine"), client), priv(p) { setEnabled(true); } @@ -50,7 +50,7 @@ void QmlEngineDebugClient::messageReceived(const QByteArray &data) priv->message(data); } -QmlEngineDebugPrivate::QmlEngineDebugPrivate(QmlDebugClient *c) +QmlEngineDebugPrivate::QmlEngineDebugPrivate(QmlDebugConnection *c) : client(c, this), nextId(0) { } @@ -206,7 +206,7 @@ void QmlEngineDebugPrivate::message(const QByteArray &data) } } -QmlEngineDebug::QmlEngineDebug(QmlDebugClient *client, QObject *parent) +QmlEngineDebug::QmlEngineDebug(QmlDebugConnection *client, QObject *parent) : QObject(*(new QmlEngineDebugPrivate(client)), parent) { } diff --git a/src/declarative/debugger/qmldebug.h b/src/declarative/debugger/qmldebug.h index 52a5400..11e6b3e 100644 --- a/src/declarative/debugger/qmldebug.h +++ b/src/declarative/debugger/qmldebug.h @@ -5,7 +5,7 @@ #include #include -class QmlDebugClient; +class QmlDebugConnection; class QmlDebugWatch; class QmlDebugEnginesQuery; class QmlDebugRootContextQuery; @@ -20,7 +20,7 @@ class Q_DECLARATIVE_EXPORT QmlEngineDebug : public QObject { Q_OBJECT public: - QmlEngineDebug(QmlDebugClient *, QObject * = 0); + QmlEngineDebug(QmlDebugConnection *, QObject * = 0); QmlDebugWatch *addWatch(const QmlDebugPropertyReference &, QObject *parent = 0); diff --git a/src/declarative/debugger/qmldebugclient.cpp b/src/declarative/debugger/qmldebugclient.cpp index 562d87d..7c5c37b 100644 --- a/src/declarative/debugger/qmldebugclient.cpp +++ b/src/declarative/debugger/qmldebugclient.cpp @@ -47,22 +47,22 @@ QT_BEGIN_NAMESPACE -class QmlDebugClientPrivate : public QObject +class QmlDebugConnectionPrivate : public QObject { Q_OBJECT public: - QmlDebugClientPrivate(QmlDebugClient *c); - QmlDebugClient *q; + QmlDebugConnectionPrivate(QmlDebugConnection *c); + QmlDebugConnection *q; QPacketProtocol *protocol; QStringList enabled; - QHash plugins; + QHash plugins; public slots: void connected(); void readyRead(); }; -QmlDebugClientPrivate::QmlDebugClientPrivate(QmlDebugClient *c) +QmlDebugConnectionPrivate::QmlDebugConnectionPrivate(QmlDebugConnection *c) : QObject(c), q(c), protocol(0) { protocol = new QPacketProtocol(q, this); @@ -70,59 +70,59 @@ QmlDebugClientPrivate::QmlDebugClientPrivate(QmlDebugClient *c) QObject::connect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); } -void QmlDebugClientPrivate::connected() +void QmlDebugConnectionPrivate::connected() { QPacket pack; pack << QString(QLatin1String("QmlDebugServer")) << enabled; protocol->send(pack); } -void QmlDebugClientPrivate::readyRead() +void QmlDebugConnectionPrivate::readyRead() { QPacket pack = protocol->read(); QString name; QByteArray message; pack >> name >> message; - QHash::Iterator iter = + QHash::Iterator iter = plugins.find(name); if (iter == plugins.end()) { - qWarning() << "QmlDebugClient: Message received for missing plugin" << name; + qWarning() << "QmlDebugConnection: Message received for missing plugin" << name; } else { (*iter)->messageReceived(message); } } -QmlDebugClient::QmlDebugClient(QObject *parent) -: QTcpSocket(parent), d(new QmlDebugClientPrivate(this)) +QmlDebugConnection::QmlDebugConnection(QObject *parent) +: QTcpSocket(parent), d(new QmlDebugConnectionPrivate(this)) { } -bool QmlDebugClient::isConnected() const +bool QmlDebugConnection::isConnected() const { return state() == ConnectedState; } -class QmlDebugClientPluginPrivate : public QObjectPrivate +class QmlDebugClientPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QmlDebugClientPlugin); + Q_DECLARE_PUBLIC(QmlDebugClient); public: - QmlDebugClientPluginPrivate(); + QmlDebugClientPrivate(); QString name; - QmlDebugClient *client; + QmlDebugConnection *client; bool enabled; }; -QmlDebugClientPluginPrivate::QmlDebugClientPluginPrivate() +QmlDebugClientPrivate::QmlDebugClientPrivate() : client(0), enabled(false) { } -QmlDebugClientPlugin::QmlDebugClientPlugin(const QString &name, - QmlDebugClient *parent) -: QObject(*(new QmlDebugClientPluginPrivate), parent) +QmlDebugClient::QmlDebugClient(const QString &name, + QmlDebugConnection *parent) +: QObject(*(new QmlDebugClientPrivate), parent) { - Q_D(QmlDebugClientPlugin); + Q_D(QmlDebugClient); d->name = name; d->client = parent; @@ -130,28 +130,28 @@ QmlDebugClientPlugin::QmlDebugClientPlugin(const QString &name, return; if (d->client->d->plugins.contains(name)) { - qWarning() << "QmlDebugClientPlugin: Conflicting plugin name" << name; + qWarning() << "QmlDebugClient: Conflicting plugin name" << name; d->client = 0; } else { d->client->d->plugins.insert(name, this); } } -QString QmlDebugClientPlugin::name() const +QString QmlDebugClient::name() const { - Q_D(const QmlDebugClientPlugin); + Q_D(const QmlDebugClient); return d->name; } -bool QmlDebugClientPlugin::isEnabled() const +bool QmlDebugClient::isEnabled() const { - Q_D(const QmlDebugClientPlugin); + Q_D(const QmlDebugClient); return d->enabled; } -void QmlDebugClientPlugin::setEnabled(bool e) +void QmlDebugClient::setEnabled(bool e) { - Q_D(QmlDebugClientPlugin); + Q_D(QmlDebugClient); if (e == d->enabled) return; @@ -174,16 +174,16 @@ void QmlDebugClientPlugin::setEnabled(bool e) } } -bool QmlDebugClientPlugin::isConnected() const +bool QmlDebugClient::isConnected() const { - Q_D(const QmlDebugClientPlugin); + Q_D(const QmlDebugClient); return d->client->isConnected(); } -void QmlDebugClientPlugin::sendMessage(const QByteArray &message) +void QmlDebugClient::sendMessage(const QByteArray &message) { - Q_D(QmlDebugClientPlugin); + Q_D(QmlDebugClient); if (!d->client || !d->client->isConnected()) return; @@ -193,7 +193,7 @@ void QmlDebugClientPlugin::sendMessage(const QByteArray &message) d->client->d->protocol->send(pack); } -void QmlDebugClientPlugin::messageReceived(const QByteArray &) +void QmlDebugClient::messageReceived(const QByteArray &) { } diff --git a/src/declarative/debugger/qmldebugclient.h b/src/declarative/debugger/qmldebugclient.h index 194e913..6397670 100644 --- a/src/declarative/debugger/qmldebugclient.h +++ b/src/declarative/debugger/qmldebugclient.h @@ -50,30 +50,30 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QmlDebugClientPrivate; -class Q_DECLARATIVE_EXPORT QmlDebugClient : public QTcpSocket +class QmlDebugConnectionPrivate; +class Q_DECLARATIVE_EXPORT QmlDebugConnection : public QTcpSocket { Q_OBJECT - Q_DISABLE_COPY(QmlDebugClient) + Q_DISABLE_COPY(QmlDebugConnection) public: - QmlDebugClient(QObject * = 0); + QmlDebugConnection(QObject * = 0); bool isConnected() const; private: - QmlDebugClientPrivate *d; - friend class QmlDebugClientPlugin; - friend class QmlDebugClientPluginPrivate; + QmlDebugConnectionPrivate *d; + friend class QmlDebugClient; + friend class QmlDebugClientPrivate; }; -class QmlDebugClientPluginPrivate; -class Q_DECLARATIVE_EXPORT QmlDebugClientPlugin : public QObject +class QmlDebugClientPrivate; +class Q_DECLARATIVE_EXPORT QmlDebugClient : public QObject { Q_OBJECT - Q_DECLARE_PRIVATE(QmlDebugClientPlugin) - Q_DISABLE_COPY(QmlDebugClientPlugin) + Q_DECLARE_PRIVATE(QmlDebugClient) + Q_DISABLE_COPY(QmlDebugClient) public: - QmlDebugClientPlugin(const QString &, QmlDebugClient *parent); + QmlDebugClient(const QString &, QmlDebugConnection *parent); QString name() const; @@ -88,8 +88,8 @@ protected: virtual void messageReceived(const QByteArray &); private: - friend class QmlDebugClient; - friend class QmlDebugClientPrivate; + friend class QmlDebugConnection; + friend class QmlDebugConnectionPrivate; }; QT_END_NAMESPACE diff --git a/tools/qmldebugger/canvasframerate.cpp b/tools/qmldebugger/canvasframerate.cpp index f2a813d..d0be579 100644 --- a/tools/qmldebugger/canvasframerate.cpp +++ b/tools/qmldebugger/canvasframerate.cpp @@ -209,11 +209,11 @@ void QLineGraph::paintEvent(QPaintEvent *) drawTime(&p, r); } -class CanvasFrameRatePlugin : public QmlDebugClientPlugin +class CanvasFrameRatePlugin : public QmlDebugClient { Q_OBJECT public: - CanvasFrameRatePlugin(QmlDebugClient *client); + CanvasFrameRatePlugin(QmlDebugConnection *client); signals: void sample(int, int, int, int, bool); @@ -227,8 +227,8 @@ private: int ld; }; -CanvasFrameRatePlugin::CanvasFrameRatePlugin(QmlDebugClient *client) -: QmlDebugClientPlugin(QLatin1String("CanvasFrameRate"), client), la(-1) +CanvasFrameRatePlugin::CanvasFrameRatePlugin(QmlDebugConnection *client) +: QmlDebugClient(QLatin1String("CanvasFrameRate"), client), la(-1) { } @@ -248,7 +248,7 @@ void CanvasFrameRatePlugin::messageReceived(const QByteArray &data) ld = d; } -CanvasFrameRate::CanvasFrameRate(QmlDebugClient *client, QWidget *parent) +CanvasFrameRate::CanvasFrameRate(QmlDebugConnection *client, QWidget *parent) : QWidget(parent) { m_plugin = new CanvasFrameRatePlugin(client); @@ -300,7 +300,7 @@ void CanvasFrameRate::stateChanged(int s) { bool checked = s != 0; - static_cast(m_plugin)->setEnabled(checked); + static_cast(m_plugin)->setEnabled(checked); } QT_END_NAMESPACE diff --git a/tools/qmldebugger/canvasframerate.h b/tools/qmldebugger/canvasframerate.h index cc40d4c..912412b 100644 --- a/tools/qmldebugger/canvasframerate.h +++ b/tools/qmldebugger/canvasframerate.h @@ -5,13 +5,13 @@ QT_BEGIN_NAMESPACE -class QmlDebugClient; +class QmlDebugConnection; class QTabWidget; class CanvasFrameRate : public QWidget { Q_OBJECT public: - CanvasFrameRate(QmlDebugClient *, QWidget *parent = 0); + CanvasFrameRate(QmlDebugConnection *, QWidget *parent = 0); private slots: void newTab(); diff --git a/tools/qmldebugger/canvasscene.cpp b/tools/qmldebugger/canvasscene.cpp index 95f3098..65db9da 100644 --- a/tools/qmldebugger/canvasscene.cpp +++ b/tools/qmldebugger/canvasscene.cpp @@ -10,10 +10,10 @@ QT_BEGIN_NAMESPACE -class CanvasSceneClientPlugin : public QmlDebugClientPlugin +class CanvasSceneClientPlugin : public QmlDebugClient { public: - CanvasSceneClientPlugin(QmlDebugClient *, CanvasScene *s); + CanvasSceneClientPlugin(QmlDebugConnection *, CanvasScene *s); protected: void messageReceived(const QByteArray &); @@ -40,9 +40,9 @@ public: QFxImage *img; }; -CanvasSceneClientPlugin::CanvasSceneClientPlugin(QmlDebugClient *c, +CanvasSceneClientPlugin::CanvasSceneClientPlugin(QmlDebugConnection *c, CanvasScene *s) -: QmlDebugClientPlugin(QLatin1String("CanvasScene"), c), scene(s) +: QmlDebugClient(QLatin1String("CanvasScene"), c), scene(s) { } @@ -144,7 +144,7 @@ void CanvasSceneClientPlugin::dump(QDataStream &ds, int indent) dump(ds, indent + 1); } -CanvasScene::CanvasScene(QmlDebugClient *c, QWidget *parent) +CanvasScene::CanvasScene(QmlDebugConnection *c, QWidget *parent) : QWidget(parent) { client = new CanvasSceneClientPlugin(c, this); diff --git a/tools/qmldebugger/canvasscene.h b/tools/qmldebugger/canvasscene.h index 8b583e8..8c6b8d5 100644 --- a/tools/qmldebugger/canvasscene.h +++ b/tools/qmldebugger/canvasscene.h @@ -8,14 +8,14 @@ QT_BEGIN_NAMESPACE -class QmlDebugClient; +class QmlDebugConnection; class CanvasSceneClient; -class QmlDebugClientPlugin; +class QmlDebugClient; class CanvasScene : public QWidget { Q_OBJECT public: - CanvasScene(QmlDebugClient *, QWidget *parent = 0); + CanvasScene(QmlDebugConnection *, QWidget *parent = 0); void message(QDataStream &); private slots: @@ -29,7 +29,7 @@ private slots: private: void setOpacityRecur(QTreeWidgetItem *, qreal); void clone(QTreeWidgetItem *item, QSimpleCanvasItem *me, QDataStream &); - QmlDebugClientPlugin *client; + QmlDebugClient *client; QTreeWidget *m_tree; QSimpleCanvas *m_canvas; diff --git a/tools/qmldebugger/engine.cpp b/tools/qmldebugger/engine.cpp index 46d30c4..3b8c8b1 100644 --- a/tools/qmldebugger/engine.cpp +++ b/tools/qmldebugger/engine.cpp @@ -27,7 +27,7 @@ private: int m_engineId; }; -EnginePane::EnginePane(QmlDebugClient *client, QWidget *parent) +EnginePane::EnginePane(QmlDebugConnection *client, QWidget *parent) : QWidget(parent), m_client(client), m_engines(0), m_context(0), m_object(0) { QVBoxLayout *layout = new QVBoxLayout; diff --git a/tools/qmldebugger/engine.h b/tools/qmldebugger/engine.h index 191cd1d..a713f25 100644 --- a/tools/qmldebugger/engine.h +++ b/tools/qmldebugger/engine.h @@ -9,14 +9,14 @@ QT_BEGIN_NAMESPACE -class QmlDebugClient; +class QmlDebugConnection; class EngineClientPlugin; class QLineEdit; class EnginePane : public QWidget { Q_OBJECT public: - EnginePane(QmlDebugClient *, QWidget *parent = 0); + EnginePane(QmlDebugConnection *, QWidget *parent = 0); private slots: void queryEngines(); diff --git a/tools/qmldebugger/main.cpp b/tools/qmldebugger/main.cpp index 4bed41d..500836f 100644 --- a/tools/qmldebugger/main.cpp +++ b/tools/qmldebugger/main.cpp @@ -29,7 +29,7 @@ private slots: void connectionStateChanged(); private: - QmlDebugClient client; + QmlDebugConnection client; QLabel *m_connectionState; QLineEdit *m_host; -- cgit v0.12