X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fremotepeer.cpp;h=942bbd6827a038bf26b2c34afb7af905878d1459;hp=d621632fb736c8cf6f6e958edd5d3366dd5c64d8;hb=fcacaaf16551524c7ebb6114254d005274cc3d63;hpb=714b39660fe19e7f092880019429c8da76ee2bd5 diff --git a/src/common/remotepeer.cpp b/src/common/remotepeer.cpp index d621632f..942bbd68 100644 --- a/src/common/remotepeer.cpp +++ b/src/common/remotepeer.cpp @@ -46,9 +46,9 @@ RemotePeer::RemotePeer(::AuthHandler *authHandler, QTcpSocket *socket, Compresso _msgSize(0) { socket->setParent(this); - connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), SLOT(onSocketStateChanged(QAbstractSocket::SocketState))); + connect(socket, &QAbstractSocket::stateChanged, this, &RemotePeer::onSocketStateChanged); connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(onSocketError(QAbstractSocket::SocketError))); - connect(socket, SIGNAL(disconnected()), SIGNAL(disconnected())); + connect(socket, &QAbstractSocket::disconnected, this, &Peer::disconnected); #ifdef HAVE_SSL auto *sslSocket = qobject_cast(socket); @@ -56,10 +56,10 @@ RemotePeer::RemotePeer(::AuthHandler *authHandler, QTcpSocket *socket, Compresso connect(sslSocket, SIGNAL(encrypted()), SIGNAL(secureStateChanged())); #endif - connect(_compressor, SIGNAL(readyRead()), SLOT(onReadyRead())); - connect(_compressor, SIGNAL(error(Compressor::Error)), SLOT(onCompressionError(Compressor::Error))); + connect(_compressor, &Compressor::readyRead, this, &RemotePeer::onReadyRead); + connect(_compressor, &Compressor::error, this, &RemotePeer::onCompressionError); - connect(_heartBeatTimer, SIGNAL(timeout()), SLOT(sendHeartBeat())); + connect(_heartBeatTimer, &QTimer::timeout, this, &RemotePeer::sendHeartBeat); } @@ -132,7 +132,7 @@ void RemotePeer::setSignalProxy(::SignalProxy *proxy) return; } _signalProxy = proxy; - connect(proxy, SIGNAL(heartBeatIntervalChanged(int)), SLOT(changeHeartBeatInterval(int))); + connect(proxy, &SignalProxy::heartBeatIntervalChanged, this, &RemotePeer::changeHeartBeatInterval); _heartBeatTimer->setInterval(proxy->heartBeatInterval() * 1000); _heartBeatTimer->start(); }