summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-18 16:52:20 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-04-27 15:28:01 +0000
commit5147400ea72d349e23a5280fb8d3ca9425237ddf (patch)
tree2e50d4f407d6bf0974da7ce00b40acc386632019 /src
parentf309a4ac80b4c1e5c8076388e196a1bd15e83f57 (diff)
downloadqtwebsockets-5147400ea72d349e23a5280fb8d3ca9425237ddf.tar.gz
Move Q_REQUIRED_RESULT to the beginning of the declaration
That's the correct place and works with C++11 attributes. Change-Id: I7814054a102a407d876ffffd14b6a2fed3744b03 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/websockets/qwebsocket_p.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/websockets/qwebsocket_p.h b/src/websockets/qwebsocket_p.h
index 4863de7..4d33788 100644
--- a/src/websockets/qwebsocket_p.h
+++ b/src/websockets/qwebsocket_p.h
@@ -179,7 +179,7 @@ private:
void processHandshake(QTcpSocket *pSocket);
void processStateChanged(QAbstractSocket::SocketState socketState);
- qint64 doWriteFrames(const QByteArray &data, bool isBinary) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT qint64 doWriteFrames(const QByteArray &data, bool isBinary);
void makeConnections(const QTcpSocket *pTcpSocket);
void releaseConnections(const QTcpSocket *pTcpSocket);
@@ -195,15 +195,16 @@ private:
QByteArray key,
const QList<QPair<QString, QString> > &headers);
- static QWebSocket *upgradeFrom(QTcpSocket *tcpSocket,
- const QWebSocketHandshakeRequest &request,
- const QWebSocketHandshakeResponse &response,
- QObject *parent = Q_NULLPTR) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT static QWebSocket *
+ upgradeFrom(QTcpSocket *tcpSocket,
+ const QWebSocketHandshakeRequest &request,
+ const QWebSocketHandshakeResponse &response,
+ QObject *parent = Q_NULLPTR);
quint32 generateMaskingKey() const;
QByteArray generateKey() const;
- qint64 writeFrames(const QList<QByteArray> &frames) Q_REQUIRED_RESULT;
- qint64 writeFrame(const QByteArray &frame) Q_REQUIRED_RESULT;
+ Q_REQUIRED_RESULT qint64 writeFrames(const QList<QByteArray> &frames);
+ Q_REQUIRED_RESULT qint64 writeFrame(const QByteArray &frame);
QTcpSocket *m_pSocket;
QString m_errorString;