summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qabstractsocket.cpp
diff options
context:
space:
mode:
authorAlexander Akulich <akulichalexander@gmail.com>2020-02-07 16:43:07 +0300
committerAlexander Akulich <akulichalexander@gmail.com>2020-02-26 23:07:52 +0300
commit6d18e4a2b8d82519df177bff5a86a8eca5dae9e6 (patch)
treeccb1462a3c60f802e4b4f72cb1900212217e2084 /src/network/socket/qabstractsocket.cpp
parente1920f65936fe7d712441e88c023746ab5c21cee (diff)
Revert "QAbstractSocket: deprecate 'error' member-function"
This reverts commit 94b3dd77f29a00ebbd1efdc66d75f57e1c75b152. The patch fixes ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commit to keep the getter as is and change the signal name instead. Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/socket/qabstractsocket.cpp')
-rw-r--r--src/network/socket/qabstractsocket.cpp29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 5f1ff2fcb8..57dec59bc7 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -215,7 +215,7 @@
connections, you will have to register it with Q_DECLARE_METATYPE() and
qRegisterMetaType().
- \sa socketError(), errorString(), {Creating Custom Qt Types}
+ \sa error(), errorString(), {Creating Custom Qt Types}
*/
/*!
@@ -329,7 +329,7 @@
is non-blocking).
\value UnknownSocketError An unidentified error occurred.
- \sa QAbstractSocket::socketError()
+ \sa QAbstractSocket::error()
*/
/*!
@@ -2092,7 +2092,7 @@ QVariant QAbstractSocket::socketOption(QAbstractSocket::SocketOption option)
Waits until the socket is connected, up to \a msecs
milliseconds. If the connection has been established, this
function returns \c true; otherwise it returns \c false. In the case
- where it returns \c false, you can call socketError() to determine
+ where it returns \c false, you can call error() to determine
the cause of the error.
The following example waits up to one second for a connection
@@ -2864,7 +2864,7 @@ void QAbstractSocket::setReadBufferSize(qint64 size)
/*!
Returns the state of the socket.
- \sa socketError()
+ \sa error()
*/
QAbstractSocket::SocketState QAbstractSocket::state() const
{
@@ -2891,35 +2891,16 @@ QAbstractSocket::SocketType QAbstractSocket::socketType() const
return d_func()->socketType;
}
-#if QT_DEPRECATED_SINCE(5, 15)
/*!
- \deprecated
-
- Use socketError() instead.
-
- Returns the type of error that last occurred.
-
- \sa state(), errorString(), socketError()
-*/
-QAbstractSocket::SocketError QAbstractSocket::error() const
-{
- return socketError();
-}
-#endif // QT_DEPRECATED_SINCE(5, 15)
-
-/*!
- \since 5.15
-
Returns the type of error that last occurred.
\sa state(), errorString()
*/
-QAbstractSocket::SocketError QAbstractSocket::socketError() const
+QAbstractSocket::SocketError QAbstractSocket::error() const
{
return d_func()->socketError;
}
-
/*!
Sets the type of error that last occurred to \a socketError.