Remove superfluous Q_REQUIRED_RESULT
authorKurt Pattyn <pattyn.kurt@gmail.com>
Mon, 3 Feb 2014 00:40:33 +0000 (01:40 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 4 Feb 2014 10:15:19 +0000 (11:15 +0100)
Change-Id: Ie4e01a82082c45918b55e8588c7322dd359ba8c1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
examples/echoclient/echoclient.cpp
examples/sslechoclient/sslechoclient.cpp
src/websockets/qwebsocket.h
src/websockets/qwebsocket_p.h

index c1ef7ed..dbda381 100644 (file)
@@ -61,8 +61,7 @@ void EchoClient::onConnected()
     qDebug() << "Websocket connected";
     connect(&m_webSocket, &QWebSocket::textMessageReceived,
             this, &EchoClient::onTextMessageReceived);
-    qint64 bytesWritten = m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
-    Q_UNUSED(bytesWritten);
+    m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
 }
 //! [onConnected]
 
index 73e6910..05a1deb 100644 (file)
@@ -59,8 +59,7 @@ void SslEchoClient::onConnected()
     qDebug() << "Websocket connected";
     connect(&m_webSocket, &QWebSocket::textMessageReceived,
             this, &SslEchoClient::onTextMessageReceived);
-    qint64 bytesWritten = m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
-    Q_UNUSED(bytesWritten);
+    m_webSocket.sendTextMessage(QStringLiteral("Hello, world!"));
 }
 //! [onConnected]
 
index 15c3a82..5a8cd1a 100644 (file)
@@ -100,8 +100,8 @@ public:
     QWebSocketProtocol::CloseCode closeCode() const;
     QString closeReason() const;
 
-    qint64 sendTextMessage(const QString &message) Q_REQUIRED_RESULT;
-    qint64 sendBinaryMessage(const QByteArray &data) Q_REQUIRED_RESULT;
+    qint64 sendTextMessage(const QString &message);
+    qint64 sendBinaryMessage(const QByteArray &data);
 
 #ifndef QT_NO_SSL
     void ignoreSslErrors(const QList<QSslError> &errors);
index a837aff..d8c97dd 100644 (file)
@@ -138,8 +138,8 @@ public:
     QWebSocketProtocol::CloseCode closeCode() const;
     QString closeReason() const;
 
-    qint64 sendTextMessage(const QString &message) Q_REQUIRED_RESULT;
-    qint64 sendBinaryMessage(const QByteArray &data) Q_REQUIRED_RESULT;
+    qint64 sendTextMessage(const QString &message);
+    qint64 sendBinaryMessage(const QByteArray &data);
 
 #ifndef QT_NO_SSL
     void ignoreSslErrors(const QList<QSslError> &errors);