Merge pull request #1303 from daleglass/qt5-fix-qtcpsocket-error

Replace deprecated QAbstractsocket::error with QAbstractSocket::error…
This commit is contained in:
Kalila 2021-08-19 20:51:27 -04:00 committed by GitHub
commit 45e10f0670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View file

@ -124,9 +124,9 @@ HTTPConnection::HTTPConnection(QTcpSocket* socket, HTTPManager* parentManager) :
_socket->setParent(this);
// connect initial slots
connect(socket, SIGNAL(readyRead()), SLOT(readRequest()));
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(deleteLater()));
connect(socket, SIGNAL(disconnected()), SLOT(deleteLater()));
connect(socket, &QAbstractSocket::readyRead, this, &HTTPConnection::readRequest);
connect(socket, &QAbstractSocket::errorOccurred, this, &HTTPConnection::deleteLater);
connect(socket, &QAbstractSocket::disconnected, this, &HTTPConnection::deleteLater);
}
HTTPConnection::~HTTPConnection() {

View file

@ -1224,8 +1224,7 @@ void LimitedNodeList::updateLocalSocket() {
QTcpSocket* localIPTestSocket = new QTcpSocket;
connect(localIPTestSocket, &QTcpSocket::connected, this, &LimitedNodeList::connectedForLocalSocketTest);
connect(localIPTestSocket, static_cast<void(QTcpSocket::*)(QAbstractSocket::SocketError)>(&QTcpSocket::error),
this, &LimitedNodeList::errorTestingLocalSocket);
connect(localIPTestSocket, &QTcpSocket::errorOccurred, this, &LimitedNodeList::errorTestingLocalSocket);
// attempt to connect to our reliable host
localIPTestSocket->connectToHost(RELIABLE_LOCAL_IP_CHECK_HOST, RELIABLE_LOCAL_IP_CHECK_PORT);