diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2013-12-07 12:54:09 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-10 11:46:11 +0100 |
commit | 7d35f5c6b7b8b187388523674b4a95585f369d78 (patch) | |
tree | 9c56fc7bc7eddc0da37e0d144e054eef288eb1e2 /src/websockets/qwebsocket_p.h | |
parent | 7c8d645c4759f7290fd31fe439abf0a99aac9161 (diff) | |
download | qtwebsockets-7d35f5c6b7b8b187388523674b4a95585f369d78.tar.gz |
Cleanup code to comply with Qt style
- Correct placement of curly braces
- Remove commented-out code
- Remove superfluous qDebug statements
- Add missing QT_BEGIN_NAMESPACE declarations
- Add move semantics
- Add cleanup handling to QWebSocketServerPrivate
- Add error handling to handshake response, QWebSocketServerPrivate,
QWebSocketServer, dataprocessor
Change-Id: I0690dc2c444fd6fc0db974d1459bf41bd8c31d40
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocket_p.h')
-rw-r--r-- | src/websockets/qwebsocket_p.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/websockets/qwebsocket_p.h b/src/websockets/qwebsocket_p.h index 9fd686b..e21c274 100644 --- a/src/websockets/qwebsocket_p.h +++ b/src/websockets/qwebsocket_p.h @@ -77,6 +77,8 @@ class QWebSocket; struct QWebSocketConfiguration { + Q_DISABLE_COPY(QWebSocketConfiguration) + public: QWebSocketConfiguration(); @@ -154,7 +156,7 @@ public: public Q_SLOTS: void close(QWebSocketProtocol::CloseCode closeCode, QString reason); void open(const QUrl &url, bool mask); - void ping(const QByteArray &payload); + void ping(QByteArray payload); #ifndef QT_NO_SSL void ignoreSslErrors(); @@ -182,13 +184,12 @@ private: void setSocketState(QAbstractSocket::SocketState state); void setErrorString(const QString &errorString); - qint64 doWriteData(const QByteArray &data, bool isBinary); qint64 doWriteFrames(const QByteArray &data, bool isBinary); void makeConnections(const QTcpSocket *pTcpSocket); void releaseConnections(const QTcpSocket *pTcpSocket); - QByteArray getFrameHeader(QWebSocketProtocol::OpCode opCode, quint64 payloadLength, quint32 maskingKey, bool lastFrame) const; + QByteArray getFrameHeader(QWebSocketProtocol::OpCode opCode, quint64 payloadLength, quint32 maskingKey, bool lastFrame); QString calculateAcceptKey(const QString &key) const; QString createHandShakeRequest(QString resourceName, QString host, |