diff options
author | Alexander Akulich <akulichalexander@gmail.com> | 2020-02-07 17:29:33 +0300 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-02-27 13:56:45 +0100 |
commit | cb26a4da69db434d4227bc16e41187f3db93c984 (patch) | |
tree | 6f047493668c04ef721831b271e49a0e2802ab2c /examples/network/loopback | |
parent | 469c3338407a5cf74c5e35c43ebb48c14e21ecac (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/loopback')
-rw-r--r-- | examples/network/loopback/dialog.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<QAbstractSocket::SocketError>::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<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), + connect(tcpServerConnection, &QAbstractSocket::errorOccurred, this, &Dialog::displayError); connect(tcpServerConnection, &QTcpSocket::disconnected, tcpServerConnection, &QTcpSocket::deleteLater); |