summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-08-20 14:58:04 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-08-25 12:52:26 +0200
commitf9cd291d9713fa67969a6f20738efdc624a2c0c5 (patch)
treef31837911626e69535dcd6357b1efab06767cdfa
parentd05ac802da9a8021d552bb7cf42f170aedf486fd (diff)
downloadqtwebsockets-f9cd291d9713fa67969a6f20738efdc624a2c0c5.tar.gz
Update changes doc with the singular change
Only the removal of the deprecated API. Pick-to: 6.2 Fixes: QTBUG-94932 Change-Id: Ib7de6b11701d4f39273eb33e75e1cc8fe2deeae3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-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.
*/