Sanitize open() method
authorKurt Pattyn <pattyn.kurt@gmail.com>
Fri, 7 Feb 2014 17:06:58 +0000 (18:06 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 7 Feb 2014 17:58:35 +0000 (18:58 +0100)
Removed the mask parameter because a web socket client does not have
a choice between masking and not masking.

Change-Id: I3c33acc235bb2a99476abb6201e6dbb6f881dd70
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
src/websockets/qwebsocket.cpp
src/websockets/qwebsocket.h

index 6e60230..f2a2b6a 100644 (file)
@@ -373,14 +373,11 @@ void QWebSocket::close(QWebSocketProtocol::CloseCode closeCode, const QString &r
 
 /*!
     \brief Opens a websocket connection using the given \a url.
-    If \a mask is true, all frames will be masked; this is only necessary for client side sockets;
-    servers should never mask.
-    \note A client socket must *always* mask its frames; servers may *never* mask its frames.
  */
-void QWebSocket::open(const QUrl &url, bool mask)
+void QWebSocket::open(const QUrl &url)
 {
     Q_D(QWebSocket);
-    d->open(url, mask);
+    d->open(url, true);
 }
 
 /*!
index 7d1e544..660b3a3 100644 (file)
@@ -112,7 +112,7 @@ public:
 public Q_SLOTS:
     void close(QWebSocketProtocol::CloseCode closeCode = QWebSocketProtocol::CloseCodeNormal,
                const QString &reason = QString());
-    void open(const QUrl &url, bool mask = true);
+    void open(const QUrl &url);
     void ping(const QByteArray &payload = QByteArray());
 #ifndef QT_NO_SSL
     void ignoreSslErrors();