X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fcoreconnection.cpp;h=f5239140281f9364735a5b22b9bb24626e665cec;hp=59d3f8fffcb35c01ac7560a284afa22d18bea505;hb=cf721fb75a7525b03c0086f98314b828f5322001;hpb=d9f4d3f0eabd3767b4d25438319116f77c158c52 diff --git a/src/client/coreconnection.cpp b/src/client/coreconnection.cpp index 59d3f8ff..f5239140 100644 --- a/src/client/coreconnection.cpp +++ b/src/client/coreconnection.cpp @@ -45,6 +45,12 @@ CoreConnection::CoreConnection(CoreAccountModel *model, QObject *parent) _progressValue(-1) { qRegisterMetaType("CoreConnection::ConnectionState"); +} + +void CoreConnection::init() { + Client::signalProxy()->setHeartBeatInterval(30); + connect(Client::signalProxy(), SIGNAL(disconnected()), SLOT(coreSocketDisconnected())); + connect(Client::signalProxy(), SIGNAL(lagUpdated(int)), SIGNAL(lagUpdated(int))); _reconnectTimer.setSingleShot(true); connect(&_reconnectTimer, SIGNAL(timeout()), SLOT(reconnectTimeout())); @@ -53,11 +59,6 @@ CoreConnection::CoreConnection(CoreAccountModel *model, QObject *parent) connect(Solid::Networking::notifier(), SIGNAL(statusChanged(Solid::Networking::Status)), SLOT(solidNetworkStatusChanged(Solid::Networking::Status))); #endif -} - -void CoreConnection::init() { - Client::signalProxy()->setHeartBeatInterval(30); - connect(Client::signalProxy(), SIGNAL(disconnected()), SLOT(coreSocketDisconnected())); CoreConnectionSettings s; s.initAndNotify("PingTimeoutInterval", this, SLOT(pingTimeoutIntervalChanged(QVariant)), 60); @@ -336,6 +337,7 @@ void CoreConnection::resetConnection(bool wantReconnect) { setProgressMaximum(-1); // disable setState(Disconnected); + emit lagUpdated(-1); emit connectionMsg(tr("Disconnected from core.")); emit encrypted(false); @@ -472,6 +474,8 @@ void CoreConnection::clientInitAck(const QVariantMap &msg) { return; } + Client::setCoreFeatures((Quassel::Features)msg["CoreFeatures"].toUInt()); + #ifndef QT_NO_COMPRESS if(msg["SupportsCompression"].toBool()) { _socket->setProperty("UseCompression", true);