#include "clientsettings.h"
#include "logmessage.h"
#include "peerfactory.h"
+#include "util.h"
using namespace Protocol;
// The baseclass implementation will make sure to only send the signal once.
// However, we do want to prefer a potential socket error signal that may be on route already, so
// give this a chance to overtake us by spinning the loop...
- QTimer::singleShot(0, this, SLOT(onSocketDisconnected()));
+ QTimer::singleShot(0, this, &ClientAuthHandler::onSocketDisconnected);
}
break;
default:
qDebug() << "Legacy core detected, switching to compatibility mode";
- RemotePeer *peer = PeerFactory::createPeer(PeerFactory::ProtoDescriptor(Protocol::LegacyProtocol, 0), this, socket(), Compressor::NoCompression, this);
+ auto *peer = PeerFactory::createPeer(PeerFactory::ProtoDescriptor(Protocol::LegacyProtocol, 0), this, socket(), Compressor::NoCompression, this);
// Only needed for the legacy peer, as all others check the protocol version before instantiation
- connect(peer, SIGNAL(protocolVersionMismatch(int,int)), SLOT(onProtocolVersionMismatch(int,int)));
+ connect(peer, &RemotePeer::protocolVersionMismatch, this, &ClientAuthHandler::onProtocolVersionMismatch);
setPeer(peer);
}
}
if (peer->protocol() == Protocol::LegacyProtocol) {
- connect(peer, SIGNAL(protocolVersionMismatch(int,int)), SLOT(onProtocolVersionMismatch(int,int)));
+ connect(peer, &RemotePeer::protocolVersionMismatch, this, &ClientAuthHandler::onProtocolVersionMismatch);
_legacy = true;
}
auto *sslSocket = qobject_cast<QSslSocket *>(socket());
Q_ASSERT(sslSocket);
connect(sslSocket, &QSslSocket::encrypted, this, &ClientAuthHandler::onSslSocketEncrypted);
- connect(sslSocket, SIGNAL(sslErrors(QList<QSslError>)), SLOT(onSslErrors()));
+ connect(sslSocket, selectOverload<const QList<QSslError>&>(&QSslSocket::sslErrors), this, &ClientAuthHandler::onSslErrors);
qDebug() << "Starting encryption...";
sslSocket->flush();
sslSocket->startClientEncryption();