summaryrefslogtreecommitdiffstats
path: root/examples/network/torrent
diff options
context:
space:
mode:
authorAlexander Akulich <akulichalexander@gmail.com>2020-02-07 17:29:33 +0300
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-02-27 13:56:45 +0100
commitcb26a4da69db434d4227bc16e41187f3db93c984 (patch)
tree6f047493668c04ef721831b271e49a0e2802ab2c /examples/network/torrent
parent469c3338407a5cf74c5e35c43ebb48c14e21ecac (diff)
QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'examples/network/torrent')
-rw-r--r--examples/network/torrent/peerwireclient.cpp4
-rw-r--r--examples/network/torrent/torrentclient.cpp2
-rw-r--r--examples/network/torrent/torrentserver.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/network/torrent/peerwireclient.cpp b/examples/network/torrent/peerwireclient.cpp
index cea4ef53fa..c30abd0e13 100644
--- a/examples/network/torrent/peerwireclient.cpp
+++ b/examples/network/torrent/peerwireclient.cpp
@@ -107,8 +107,8 @@ PeerWireClient::PeerWireClient(const QByteArray &peerId, QObject *parent)
this, &PeerWireClient::readyRead);
connect(&socket, &QTcpSocket::disconnected,
this, &PeerWireClient::disconnected);
- connect(&socket, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error),
- this, QOverload<QAbstractSocket::SocketError>::of(&PeerWireClient::error));
+ connect(&socket, &QTcpSocket::errorOccurred,
+ this, &PeerWireClient::errorOccurred);
connect(&socket, &QTcpSocket::bytesWritten,
this, &PeerWireClient::bytesWritten);
connect(&socket, &QTcpSocket::stateChanged,
diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp
index 6b11338f42..2ba4476861 100644
--- a/examples/network/torrent/torrentclient.cpp
+++ b/examples/network/torrent/torrentclient.cpp
@@ -843,7 +843,7 @@ void TorrentClient::initializeConnection(PeerWireClient *client)
this, &TorrentClient::setupOutgoingConnection);
connect(client, &PeerWireClient::disconnected,
this, &TorrentClient::removeClient);
- connect(client, QOverload<QAbstractSocket::SocketError>::of(&PeerWireClient::error),
+ connect(client, &PeerWireClient::errorOccurred,
this, &TorrentClient::removeClient);
connect(client, &PeerWireClient::piecesAvailable,
this, &TorrentClient::peerPiecesAvailable);
diff --git a/examples/network/torrent/torrentserver.cpp b/examples/network/torrent/torrentserver.cpp
index 215498194b..7af958c27c 100644
--- a/examples/network/torrent/torrentserver.cpp
+++ b/examples/network/torrent/torrentserver.cpp
@@ -80,7 +80,7 @@ void TorrentServer::incomingConnection(qintptr socketDescriptor)
if (ConnectionManager::instance()->canAddConnection() && !clients.isEmpty()) {
connect(client, &PeerWireClient::infoHashReceived,
this, &TorrentServer::processInfoHash);
- connect(client, QOverload<QAbstractSocket::SocketError>::of(&PeerWireClient::error),
+ connect(client, &PeerWireClient::errorOccurred,
this, QOverload<>::of(&TorrentServer::removeClient));
RateController::instance()->addSocket(client);
ConnectionManager::instance()->addConnection(client);