diff options
author | Alexander Akulich <akulichalexander@gmail.com> | 2020-02-07 16:43:07 +0300 |
---|---|---|
committer | Alexander Akulich <akulichalexander@gmail.com> | 2020-02-26 23:07:52 +0300 |
commit | 6d18e4a2b8d82519df177bff5a86a8eca5dae9e6 (patch) | |
tree | ccb1462a3c60f802e4b4f72cb1900212217e2084 /examples/network | |
parent | e1920f65936fe7d712441e88c023746ab5c21cee (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 'examples/network')
-rw-r--r-- | examples/network/blockingfortuneclient/fortunethread.cpp | 4 | ||||
-rw-r--r-- | examples/network/threadedfortuneserver/fortunethread.cpp | 2 | ||||
-rw-r--r-- | examples/network/torrent/torrentclient.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/network/blockingfortuneclient/fortunethread.cpp b/examples/network/blockingfortuneclient/fortunethread.cpp index 24801436df..67ac7ebfa5 100644 --- a/examples/network/blockingfortuneclient/fortunethread.cpp +++ b/examples/network/blockingfortuneclient/fortunethread.cpp @@ -103,7 +103,7 @@ void FortuneThread::run() //! [6] //! [8] if (!socket.waitForConnected(Timeout)) { - emit error(socket.socketError(), socket.errorString()); + emit error(socket.error(), socket.errorString()); return; } //! [8] //! [11] @@ -115,7 +115,7 @@ void FortuneThread::run() do { if (!socket.waitForReadyRead(Timeout)) { - emit error(socket.socketError(), socket.errorString()); + emit error(socket.error(), socket.errorString()); return; } diff --git a/examples/network/threadedfortuneserver/fortunethread.cpp b/examples/network/threadedfortuneserver/fortunethread.cpp index 2e730c6c8f..ddde5121a3 100644 --- a/examples/network/threadedfortuneserver/fortunethread.cpp +++ b/examples/network/threadedfortuneserver/fortunethread.cpp @@ -65,7 +65,7 @@ void FortuneThread::run() QTcpSocket tcpSocket; //! [1] //! [2] if (!tcpSocket.setSocketDescriptor(socketDescriptor)) { - emit error(tcpSocket.socketError()); + emit error(tcpSocket.error()); return; } //! [2] //! [3] diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 00f46df892..6b11338f42 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -867,7 +867,7 @@ void TorrentClient::removeClient() // Remove the host from our list of known peers if the connection // failed. - if (client->peer() && client->socketError() == QAbstractSocket::ConnectionRefusedError) + if (client->peer() && client->error() == QAbstractSocket::ConnectionRefusedError) d->peers.removeAll(client->peer()); // Remove the client from RateController and all structures. |