X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreuserinputhandler.cpp;h=4f551f1c42ad6fac35105d117f5cd16f72f6590b;hb=bc715c756677bee7cdb7109cc656e3e5f526c988;hp=37a785eae8bb17d734e75b1deecb44e2ae1185de;hpb=0e80eb98d55efe53d280b38984426318317bcb1a;p=quassel.git diff --git a/src/core/coreuserinputhandler.cpp b/src/core/coreuserinputhandler.cpp index 37a785ea..4f551f1c 100644 --- a/src/core/coreuserinputhandler.cpp +++ b/src/core/coreuserinputhandler.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 * @@ -169,8 +169,11 @@ void CoreUserInputHandler::handleCtcp(const BufferInfo &bufferInfo, const QStrin QString verboseMessage = tr("sending CTCP-%1 request to %2").arg(ctcpTag).arg(nick); if (ctcpTag == "PING") { - uint now = QDateTime::currentDateTime().toTime_t(); - message = QString::number(now); +#if QT_VERSION >= 0x040700 + message = QString::number(QDateTime::currentMSecsSinceEpoch()); +#else + message = QString::number(QDateTime::currentDateTime().toTime_t()); +#endif } // FIXME make this a proper event @@ -816,10 +819,10 @@ int CoreUserInputHandler::lastParamOverrun(const QString &cmd, const QListme(); - int maxLen = 480 - cmd.toAscii().count(); // educated guess in case we don't know us (yet?) + int maxLen = 480 - cmd.toLatin1().count(); // educated guess in case we don't know us (yet?) if (me) - maxLen = 512 - serverEncode(me->nick()).count() - serverEncode(me->user()).count() - serverEncode(me->host()).count() - cmd.toAscii().count() - 6; + maxLen = 512 - serverEncode(me->nick()).count() - serverEncode(me->user()).count() - serverEncode(me->host()).count() - cmd.toLatin1().count() - 6; if (!params.isEmpty()) { for (int i = 0; i < params.count() - 1; i++) {