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/qwebsocketserver.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/qwebsocketserver.h')
-rw-r--r-- | src/websockets/qwebsocketserver.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/websockets/qwebsocketserver.h b/src/websockets/qwebsocketserver.h index c616c0b..bc7801a 100644 --- a/src/websockets/qwebsocketserver.h +++ b/src/websockets/qwebsocketserver.h @@ -99,7 +99,7 @@ public: bool hasPendingConnections() const; virtual QWebSocket *nextPendingConnection(); - QAbstractSocket::SocketError serverError() const; + QWebSocketProtocol::CloseCode error() const; QString errorString() const; void pauseAccepting(); @@ -118,11 +118,12 @@ public: #endif QList<QWebSocketProtocol::Version> supportedVersions() const; - QList<QString> supportedProtocols() const; - QList<QString> supportedExtensions() const; + QStringList supportedProtocols() const; + QStringList supportedExtensions() const; Q_SIGNALS: void acceptError(QAbstractSocket::SocketError socketError); + void serverError(QWebSocketProtocol::CloseCode closeCode); //TODO: should use a delegate iso of a synchronous signal void originAuthenticationRequired(QWebSocketCorsAuthenticator *pAuthenticator); void newConnection(); @@ -130,6 +131,7 @@ Q_SIGNALS: void peerVerifyError(const QSslError &error); void sslErrors(const QList<QSslError> &errors); #endif + void closed(); private: QWebSocketServerPrivate * const d_ptr; |