projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow compilation against Qt < 4.7 again
[quassel.git]
/
src
/
common
/
remoteconnection.cpp
diff --git
a/src/common/remoteconnection.cpp
b/src/common/remoteconnection.cpp
index
1ce29d4
..
26a9335
100644
(file)
--- 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;
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);
}
emit lagUpdated(_lag);
}
- dispatch(HeartBeat(QDateTime::currentDateTime
Utc
()));
+ dispatch(HeartBeat(QDateTime::currentDateTime()));
++_heartBeatCount;
}
++_heartBeatCount;
}