_connectionFeatures(0)
{
setSocket(socket);
- connect(socket, SIGNAL(readyRead()), SLOT(onReadyRead()));
+ connect(socket, &QIODevice::readyRead, this, &CoreAuthHandler::onReadyRead);
// TODO: Timeout for the handshake phase
socket()->read((char*)&data, 4);
data = qFromBigEndian<quint32>(data);
- Protocol::Type type = static_cast<Protocol::Type>(data & 0xff);
- quint16 protoFeatures = static_cast<quint16>(data>>8 & 0xffff);
+ auto type = static_cast<Protocol::Type>(data & 0xff);
+ auto protoFeatures = static_cast<quint16>(data>>8 & 0xffff);
_supportedProtos.append(PeerFactory::ProtoDescriptor(type, protoFeatures));
if (data >= 0x80000000) { // last protocol
qDebug().nospace() << "Using " << qPrintable(peer->protocolName()) << "...";
_peer = peer;
- disconnect(socket(), SIGNAL(readyRead()), this, SLOT(onReadyRead()));
+ disconnect(socket(), &QIODevice::readyRead, this, &CoreAuthHandler::onReadyRead);
}
// only in compat mode
void CoreAuthHandler::startSsl()
{
#ifdef HAVE_SSL
- QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket());
+ auto *sslSocket = qobject_cast<QSslSocket *>(socket());
Q_ASSERT(sslSocket);
qDebug() << qPrintable(tr("Starting encryption for Client:")) << _peer->description();
#ifdef HAVE_SSL
void CoreAuthHandler::onSslErrors()
{
- QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket());
+ auto *sslSocket = qobject_cast<QSslSocket *>(socket());
Q_ASSERT(sslSocket);
sslSocket->ignoreSslErrors();
}