From cb26a4da69db434d4227bc16e41187f3db93c984 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Fri, 7 Feb 2020 17:29:33 +0300 Subject: 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 --- examples/network/loopback/dialog.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/network/loopback') diff --git a/examples/network/loopback/dialog.cpp b/examples/network/loopback/dialog.cpp index d87f024031..4037f4c085 100644 --- a/examples/network/loopback/dialog.cpp +++ b/examples/network/loopback/dialog.cpp @@ -78,7 +78,7 @@ Dialog::Dialog(QWidget *parent) connect(&tcpClient, &QAbstractSocket::connected, this, &Dialog::startTransfer); connect(&tcpClient, &QIODevice::bytesWritten, this, &Dialog::updateClientProgress); - connect(&tcpClient, QOverload::of(&QAbstractSocket::error), + connect(&tcpClient, &QAbstractSocket::errorOccurred, this, &Dialog::displayError); QVBoxLayout *mainLayout = new QVBoxLayout; @@ -131,8 +131,7 @@ void Dialog::acceptConnection() connect(tcpServerConnection, &QIODevice::readyRead, this, &Dialog::updateServerProgress); - connect(tcpServerConnection, - QOverload::of(&QAbstractSocket::error), + connect(tcpServerConnection, &QAbstractSocket::errorOccurred, this, &Dialog::displayError); connect(tcpServerConnection, &QTcpSocket::disconnected, tcpServerConnection, &QTcpSocket::deleteLater); -- cgit v1.2.3