X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fcoreconnection.cpp;h=460b3b70ddc81ae6413cba9bd2487abe8c8aa5b0;hp=59d3f8fffcb35c01ac7560a284afa22d18bea505;hb=635c26ca94d131d14af7d3948b0b22db3b84ddb6;hpb=d9f4d3f0eabd3767b4d25438319116f77c158c52 diff --git a/src/client/coreconnection.cpp b/src/client/coreconnection.cpp index 59d3f8ff..460b3b70 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);