#include "quassel.h"
/* version.inc is no longer used for this */
-const int protocolVersion = 10;
-const int coreNeedsProtocol = protocolVersion;
-const int clientNeedsProtocol = protocolVersion;
+const uint protocolVersion = 10;
+const uint coreNeedsProtocol = protocolVersion;
+const uint clientNeedsProtocol = protocolVersion;
using namespace Protocol;
if (msgType == "ClientInit") {
// FIXME only in compat mode
- int ver = m["ProtocolVersion"].toInt();
+ uint ver = m["ProtocolVersion"].toUInt();
if (ver < coreNeedsProtocol) {
- emit protocolVersionMismatch(ver, coreNeedsProtocol);
+ emit protocolVersionMismatch((int)ver, (int)coreNeedsProtocol);
return;
}
else if (msgType == "ClientInitAck") {
// FIXME only in compat mode
- int ver = m["ProtocolVersion"].toInt();
+ uint ver = m["ProtocolVersion"].toUInt(); // actually an UInt
if (ver < clientNeedsProtocol) {
- emit protocolVersionMismatch(ver, clientNeedsProtocol);
+ emit protocolVersionMismatch((int)ver, (int)clientNeedsProtocol);
return;
}
#ifndef QT_NO_COMPRESS
// FIXME only in compat mode
m["ProtocolVersion"] = protocolVersion;
m["SupportSsl"] = msg.sslSupported;
- m["SupportsCompression"] = socket()->property("UseCompression"); // this property gets already set in the ClientInit handler
+ m["SupportsCompression"] = socket()->property("UseCompression").toBool(); // this property gets already set in the ClientInit handler
// This is only used for old v10 clients (pre-0.5)
int uptime = msg.coreStartTime.secsTo(QDateTime::currentDateTime().toUTC());