X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fremoteconnection.cpp;h=26a93350127cd25bdc8b03b66bd2e126da40b8af;hp=1ce29d43b39b597d46d593b20156010ce5729013;hb=d3ce95c;hpb=a4568e36edde5b86feeaae740a396f1bcaca1967 diff --git a/src/common/remoteconnection.cpp b/src/common/remoteconnection.cpp index 1ce29d43..26a93350 100644 --- a/src/common/remoteconnection.cpp +++ b/src/common/remoteconnection.cpp @@ -166,7 +166,11 @@ void RemoteConnection::handle(const HeartBeat &heartBeat) void RemoteConnection::handle(const HeartBeatReply &heartBeatReply) { _heartBeatCount = 0; - emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTimeUtc())); +#if QT_VERSION < 0x040700 + emit lagUpdated(heartBeatReply.timestamp().time().msecsTo(QTime::currentTime()) / 2); +#else + emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTime()) / 2); +#endif } @@ -185,7 +189,7 @@ void RemoteConnection::sendHeartBeat() emit lagUpdated(_lag); } - dispatch(HeartBeat(QDateTime::currentDateTimeUtc())); + dispatch(HeartBeat(QDateTime::currentDateTime())); ++_heartBeatCount; }