summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-08-20 14:58:04 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-25 11:33:09 +0000
commitf0976bb685584beb710e7512f661ab0d48f8f983 (patch)
treef54a43d374ed994ee50fd06c7958db015f5cdfbb
parent0d0a20f27d32ad04002cd6a638264214a106429e (diff)
downloadqtwebsockets-f0976bb685584beb710e7512f661ab0d48f8f983.tar.gz
Update changes doc with the singular change
Only the removal of the deprecated API. Fixes: QTBUG-94932 Change-Id: Ib7de6b11701d4f39273eb33e75e1cc8fe2deeae3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit f9cd291d9713fa67969a6f20738efdc624a2c0c5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/websockets/doc/src/qt6-changes.qdoc12
-rw-r--r--src/websockets/qwebsocketserver.cpp29
2 files changed, 41 insertions, 0 deletions
diff --git a/src/websockets/doc/src/qt6-changes.qdoc b/src/websockets/doc/src/qt6-changes.qdoc
index 84e0e68..fe4a338 100644
--- a/src/websockets/doc/src/qt6-changes.qdoc
+++ b/src/websockets/doc/src/qt6-changes.qdoc
@@ -41,4 +41,16 @@
In this topic we summarize those changes in Qt WebSockets, and provide guidance
to handle them.
+ \section1 Breaking public API changes
+
+ This section contains information about API changes that break source
+ compatibility.
+
+ \section2 QWebSocketServer::socketDescriptor(), QWebSocketServer::setSocketDescriptor()
+
+ In Qt 6, you should use QWebSocketServer::socketDescriptor() and QWebSocketServer::setSocketDescriptor()
+ to access the underlying socket descriptor of type \c{qintptr}. They mirror QTcpServer::socketDescriptor()
+ and QTcpServer::setSocketDescriptor(), and replace the now deprecated nativeDescriptor() and
+ setNativeDescriptor() methods.
+
*/
diff --git a/src/websockets/qwebsocketserver.cpp b/src/websockets/qwebsocketserver.cpp
index 6f590ad..989812f 100644
--- a/src/websockets/qwebsocketserver.cpp
+++ b/src/websockets/qwebsocketserver.cpp
@@ -696,6 +696,35 @@ qintptr QWebSocketServer::socketDescriptor() const
return d->socketDescriptor();
}
+#if QT_DEPRECATED_SINCE(6, 2)
+/*!
+ \fn bool QWebSocketServer::setNativeDescriptor(qintptr socketDescriptor)
+
+ \deprecated
+ Sets the socket descriptor this server should use when listening for incoming connections to
+ \a socketDescriptor.
+
+ Returns true if the socket is set successfully; otherwise returns false.
+ The socket is assumed to be in listening state.
+
+ \sa nativeDescriptor(), setSocketDescriptor(), isListening()
+ \since 5.12
+ */
+
+/*!
+ \fn qintptr QWebSocketServer::nativeDescriptor() const
+
+ \deprecated
+ Returns the native socket descriptor the server uses to listen for incoming instructions,
+ or -1 if the server is not listening.
+ If the server is using QNetworkProxy, the returned descriptor may not be usable with
+ native socket functions.
+
+ \sa setNativeDescriptor(), socketDescriptor(), isListening()
+ \since 5.12
+ */
+#endif
+
/*!
Returns a list of WebSocket versions that this server is supporting.
*/