diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2022-03-03 18:29:32 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-10 12:42:34 +0000 |
commit | fd3a0b549110ab60dcb5740c0e2c0e7ea027cc1c (patch) | |
tree | 6be06002b80d0b5fccd64b67ab4f25f3707b2de0 /src | |
parent | 5e3690a8620acac3d8c42a8897ce40dc3be98a9b (diff) |
QAbstractSocket: update setSocketOption documentation
Specify that it should not be called until the internal
socket engine has been created.
Given that most usages of this function will be on QUdpSockets
and that people will likely want to call bind() on those
anyway, we just document this rather than implement some
caching mechanism.
Fixes: QTBUG-67576
Change-Id: Ia5d3ade95460b7c5685681ee098f1c00bff43a90
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit e83c9e4e8e74c57708fa88ee441584eee18f19b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/socket/qabstractsocket.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 3d86959081..9304b9d503 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -1965,6 +1965,10 @@ bool QAbstractSocket::setSocketDescriptor(qintptr socketDescriptor, SocketState \since 4.6 Sets the given \a option to the value described by \a value. + \note Since the options are set on an internal socket the options + only apply if the socket has been created. This is only guaranteed to + have happened after a call to bind(), or when connected() has been emitted. + \sa socketOption() */ void QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant &value) |