X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconnectionstatuswidget.cpp;h=27236b3dbab1c22f76747e5350a769a6edf6d1ab;hp=ac4642ee25ff23db008ad16b45ed2b4555d5e159;hb=fcacaaf16551524c7ebb6114254d005274cc3d63;hpb=4a5065255e652dd0c301bac0db41b7afb777ef49 diff --git a/src/qtui/coreconnectionstatuswidget.cpp b/src/qtui/coreconnectionstatuswidget.cpp index ac4642ee..27236b3d 100644 --- a/src/qtui/coreconnectionstatuswidget.cpp +++ b/src/qtui/coreconnectionstatuswidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,7 +21,7 @@ #include "coreconnectionstatuswidget.h" #include "client.h" -#include "iconloader.h" +#include "icon.h" #include "signalproxy.h" CoreConnectionStatusWidget::CoreConnectionStatusWidget(CoreConnection *connection, QWidget *parent) @@ -33,14 +33,14 @@ CoreConnectionStatusWidget::CoreConnectionStatusWidget(CoreConnection *connectio ui.sslLabel->hide(); update(); - connect(coreConnection(), SIGNAL(progressTextChanged(QString)), ui.messageLabel, SLOT(setText(QString))); - connect(coreConnection(), SIGNAL(progressValueChanged(int)), ui.progressBar, SLOT(setValue(int))); - connect(coreConnection(), SIGNAL(progressRangeChanged(int, int)), ui.progressBar, SLOT(setRange(int, int))); - connect(coreConnection(), SIGNAL(progressRangeChanged(int, int)), this, SLOT(progressRangeChanged(int, int))); + connect(coreConnection(), &CoreConnection::progressTextChanged, ui.messageLabel, &QLabel::setText); + connect(coreConnection(), &CoreConnection::progressValueChanged, ui.progressBar, &QProgressBar::setValue); + connect(coreConnection(), &CoreConnection::progressRangeChanged, ui.progressBar, &QProgressBar::setRange); + connect(coreConnection(), &CoreConnection::progressRangeChanged, this, &CoreConnectionStatusWidget::progressRangeChanged); - connect(coreConnection(), SIGNAL(stateChanged(CoreConnection::ConnectionState)), SLOT(connectionStateChanged(CoreConnection::ConnectionState))); - connect(coreConnection(), SIGNAL(connectionError(QString)), ui.messageLabel, SLOT(setText(QString))); - connect(coreConnection(), SIGNAL(lagUpdated(int)), SLOT(updateLag(int))); + connect(coreConnection(), &CoreConnection::stateChanged, this, &CoreConnectionStatusWidget::connectionStateChanged); + connect(coreConnection(), &CoreConnection::connectionError, ui.messageLabel, &QLabel::setText); + connect(coreConnection(), &CoreConnection::lagUpdated, this, &CoreConnectionStatusWidget::updateLag); } @@ -79,11 +79,11 @@ void CoreConnectionStatusWidget::connectionStateChanged(CoreConnection::Connecti { if (state >= CoreConnection::Connected) { if (coreConnection()->isEncrypted()) { - ui.sslLabel->setPixmap(SmallIcon("security-high")); + ui.sslLabel->setPixmap(icon::get("security-high").pixmap(16)); ui.sslLabel->setToolTip(tr("The connection to your core is encrypted with SSL.")); } else { - ui.sslLabel->setPixmap(SmallIcon("security-low")); + ui.sslLabel->setPixmap(icon::get("security-low").pixmap(16)); ui.sslLabel->setToolTip(tr("The connection to your core is not encrypted.")); } ui.sslLabel->show();