Commit 93e68756 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port away from deprecated error signal

parent 1cf5932c
Pipeline #19868 passed with stage
in 5 minutes and 13 seconds
......@@ -151,7 +151,11 @@ void CompositeUploadJob::newConnection()
m_currentJob->setSocket(m_socket);
connect(m_socket, &QSslSocket::disconnected, this, &CompositeUploadJob::socketDisconnected);
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, &CompositeUploadJob::socketError);
#else
connect(m_socket, &QAbstractSocket::errorOccurred, this, &CompositeUploadJob::socketError);
#endif
connect(m_socket, QOverload<const QList<QSslError> &>::of(&QSslSocket::sslErrors), this, &CompositeUploadJob::sslError);
connect(m_socket, &QSslSocket::encrypted, this, &CompositeUploadJob::encrypted);
......
......@@ -228,7 +228,11 @@ void LanLinkProvider::udpBroadcastReceived()
m_receivedIdentityPackets[socket].np = receivedPacket;
m_receivedIdentityPackets[socket].sender = sender;
connect(socket, &QAbstractSocket::connected, this, &LanLinkProvider::tcpSocketConnected);
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
connect(socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, &LanLinkProvider::connectError);
#else
connect(socket, &QAbstractSocket::errorOccurred, this, &LanLinkProvider::connectError);
#endif
socket->connectToHost(sender, tcpPort);
}
}
......@@ -258,7 +262,11 @@ void LanLinkProvider::tcpSocketConnected()
if (!socket) return;
// TODO Delete me?
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
disconnect(socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, &LanLinkProvider::connectError);
#else
disconnect(socket, &QAbstractSocket::errorOccurred, this, &LanLinkProvider::connectError);
#endif
configureSocket(socket);
......
......@@ -99,8 +99,12 @@ void FileTransferJob::startTransfer()
m_written = bytesSent;
});
#if QT_VERSION < QT_VERSION_CHECK(5,15,0)
connect(m_reply, static_cast<void (QNetworkReply::*)(QNetworkReply::NetworkError)>(&QNetworkReply::error),
this, &FileTransferJob::transferFailed);
#else
connect(m_reply, &QNetworkReply::errorOccurred, this, &FileTransferJob::transferFailed);
#endif
connect(m_reply, &QNetworkReply::finished, this, &FileTransferJob::transferFinished);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment