X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fremotepeer.cpp;h=e405758aba4bf6a760726e309d85c4cbadd9720d;hb=549c1ec98e255d23ebabe1eaa9558a03dfbc7bc4;hp=e33f56a9ebd3a69c7a4276b5446bf5b482f15331;hpb=4c80eeb2d07b5ca75fd399b51c939961fdff1670;p=quassel.git diff --git a/src/common/remotepeer.cpp b/src/common/remotepeer.cpp index e33f56a9..e405758a 100644 --- a/src/common/remotepeer.cpp +++ b/src/common/remotepeer.cpp @@ -23,6 +23,8 @@ #ifdef HAVE_SSL # include +#else +# include #endif #include "remotepeer.h" @@ -30,7 +32,7 @@ using namespace Protocol; RemotePeer::RemotePeer(QTcpSocket *socket, QObject *parent) - : SignalProxy::AbstractPeer(parent), + : Peer(parent), _socket(socket), _signalProxy(0), _heartBeatTimer(new QTimer(this)), @@ -166,11 +168,7 @@ void RemotePeer::handle(const HeartBeat &heartBeat) void RemotePeer::handle(const HeartBeatReply &heartBeatReply) { _heartBeatCount = 0; -#if QT_VERSION < 0x040700 - emit lagUpdated(heartBeatReply.timestamp().time().msecsTo(QTime::currentTime()) / 2); -#else - emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTime()) / 2); -#endif + emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTime().toUTC()) / 2); } @@ -189,8 +187,6 @@ void RemotePeer::sendHeartBeat() emit lagUpdated(_lag); } - dispatch(HeartBeat(QDateTime::currentDateTime())); + dispatch(HeartBeat(QDateTime::currentDateTime().toUTC())); ++_heartBeatCount; } - -