X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Feventstringifier.cpp;h=c9c35ae1ccd0780b70b183066e6e14bf92e453b6;hp=d97a5bdc26f49ac75e41c47fa35357639163bd83;hb=0dfaab93892aee333f7b838658ef85b9ff270ba7;hpb=b0dcbdccb27a6f9b95b3937bcd9232dcf9a68492 diff --git a/src/core/eventstringifier.cpp b/src/core/eventstringifier.cpp index d97a5bdc..c9c35ae1 100644 --- a/src/core/eventstringifier.cpp +++ b/src/core/eventstringifier.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -733,7 +733,12 @@ void EventStringifier::handleCtcpPing(CtcpEvent *e) if (e->ctcpType() == CtcpEvent::Query) defaultHandler(e->ctcpCmd(), e); else { +#if QT_VERSION >= 0x040700 + displayMsg(e, Message::Server, tr("Received CTCP-PING answer from %1 with %2 milliseconds round trip time") + .arg(nickFromMask(e->prefix())).arg(QDateTime::fromMSecsSinceEpoch(e->param().toULongLong()).msecsTo(e->timestamp()))); +#else displayMsg(e, Message::Server, tr("Received CTCP-PING answer from %1 with %2 seconds round trip time") .arg(nickFromMask(e->prefix())).arg(QDateTime::fromTime_t(e->param().toInt()).secsTo(e->timestamp()))); +#endif } }