X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=9bb37b4ff1587a85e38ed799f8529f4be7ad3523;hp=fcd854ed3e82f4f3d796a7215b39f90ea32196d3;hb=5e0f2149927d3934c514c3dc7ca423b8784a5a90;hpb=93800658bba5dcbeca7f3deb02dd7091c455efe8 diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index fcd854ed..9bb37b4f 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -458,7 +458,7 @@ void MainWin::setupStatusBar() { connect(Client::messageProcessor(), SIGNAL(progressUpdated(int, int)), msgProcessorStatusWidget, SLOT(setProgress(int, int))); // Core Lag: - updateLagIndicator(0); + updateLagIndicator(); statusBar()->addPermanentWidget(coreLagLabel); coreLagLabel->hide(); connect(Client::signalProxy(), SIGNAL(lagUpdated(int)), this, SLOT(updateLagIndicator(int))); @@ -574,7 +574,12 @@ void MainWin::saveLayout() { } void MainWin::updateLagIndicator(int lag) { - coreLagLabel->setText(QString(tr("Core Lag: %1 msec")).arg(lag)); + QString text = tr("Core Lag: %1"); + if(lag == -1) + text = text.arg('-'); + else + text = text.arg("%1 msec").arg(lag); + coreLagLabel->setText(text); } @@ -614,6 +619,7 @@ void MainWin::setDisconnectedState() { statusBar()->showMessage(tr("Not connected to core.")); sslLabel->setPixmap(QPixmap()); sslLabel->hide(); + updateLagIndicator(); coreLagLabel->hide(); updateIcon(); }