diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-08-31 12:41:04 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-02 13:13:21 +0200 |
commit | d3c58815a37a311c1bd743a102368e03fd07fee1 (patch) | |
tree | 9847b4f33dbe8b6c2d3f535721b2441d0e67d17b /src/declarative/debugger/qdeclarativedebugclient_p.h | |
parent | 08e187b1d48aeb3f824aa5240e55def428dcad45 (diff) |
Debugger: Merge back changes from Qt Creator copy
Apply changes done to the Qt Creator copy. In Qt Creator we also support
connecting via OST, which we don't do inside QtDeclarative because it
would pull in dependencies. Anyhow, make the code align nevertheless.
Change-Id: I98f0be5ed3e136374e163cf1400df100128497ee
Reviewed-on: http://codereview.qt.nokia.com/3943
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'src/declarative/debugger/qdeclarativedebugclient_p.h')
-rw-r--r-- | src/declarative/debugger/qdeclarativedebugclient_p.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/declarative/debugger/qdeclarativedebugclient_p.h index 5b5d6705f9..5b219358ff 100644 --- a/src/declarative/debugger/qdeclarativedebugclient_p.h +++ b/src/declarative/debugger/qdeclarativedebugclient_p.h @@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeDebugConnectionPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugConnection : public QTcpSocket +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugConnection : public QIODevice { Q_OBJECT Q_DISABLE_COPY(QDeclarativeDebugConnection) @@ -72,7 +72,25 @@ public: QDeclarativeDebugConnection(QObject * = 0); ~QDeclarativeDebugConnection(); + void connectToHost(const QString &hostName, quint16 port); + + qint64 bytesAvailable() const; bool isConnected() const; + QAbstractSocket::SocketState state() const; + void flush(); + bool isSequential() const; + void close(); + bool waitForConnected(int msecs = 30000); + +signals: + void connected(); + void stateChanged(QAbstractSocket::SocketState socketState); + void error(QAbstractSocket::SocketError socketError); + +protected: + qint64 readData(char *data, qint64 maxSize); + qint64 writeData(const char *data, qint64 maxSize); + private: QDeclarativeDebugConnectionPrivate *d; friend class QDeclarativeDebugClient; @@ -96,7 +114,7 @@ public: Status status() const; - void sendMessage(const QByteArray &); + virtual void sendMessage(const QByteArray &); protected: virtual void statusChanged(Status); |