X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcoreconnectdlg.cpp;h=220e28f3c89fe9949018f6994c970fbf639d6c49;hp=b89d5d5ab6932cfe06e52f3dfd6d1d7568490150;hb=fcacaaf16551524c7ebb6114254d005274cc3d63;hpb=f3d6f8088d8be6af9319a99fb8d2fee2837b540a diff --git a/src/qtui/coreconnectdlg.cpp b/src/qtui/coreconnectdlg.cpp index b89d5d5a..220e28f3 100644 --- a/src/qtui/coreconnectdlg.cpp +++ b/src/qtui/coreconnectdlg.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 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 * @@ -18,14 +18,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include "coreconnectdlg.h" + #include -#include #include -#include "coreconnectdlg.h" - #include "clientsettings.h" #include "coreaccountsettingspage.h" +#include "icon.h" CoreConnectDlg::CoreConnectDlg(QWidget *parent) : QDialog(parent) { @@ -39,18 +39,18 @@ CoreConnectDlg::CoreConnectDlg(QWidget *parent) : QDialog(parent) _settingsPage->setSelectedAccount(lastAccount); setWindowTitle(tr("Connect to Core")); - setWindowIcon(QIcon::fromTheme("network-disconnect")); + setWindowIcon(icon::get("network-disconnect")); - QVBoxLayout *layout = new QVBoxLayout(this); + auto *layout = new QVBoxLayout(this); layout->addWidget(_settingsPage); - QDialogButtonBox *buttonBox = new QDialogButtonBox(this); + auto *buttonBox = new QDialogButtonBox(this); buttonBox->setStandardButtons(QDialogButtonBox::Ok|QDialogButtonBox::Cancel); layout->addWidget(buttonBox); connect(_settingsPage, SIGNAL(connectToCore(AccountId)), SLOT(accept())); connect(buttonBox, SIGNAL(accepted()), SLOT(accept())); - connect(buttonBox, SIGNAL(rejected()), SLOT(reject())); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); } @@ -75,8 +75,8 @@ CoreConnectAuthDlg::CoreConnectAuthDlg(CoreAccount *account, QWidget *parent) { ui.setupUi(this); - connect(ui.user, SIGNAL(textChanged(QString)), SLOT(setButtonStates())); - connect(ui.password, SIGNAL(textChanged(QString)), SLOT(setButtonStates())); + connect(ui.user, &QLineEdit::textChanged, this, &CoreConnectAuthDlg::setButtonStates); + connect(ui.password, &QLineEdit::textChanged, this, &CoreConnectAuthDlg::setButtonStates); ui.label->setText(tr("Please enter your credentials for %1:").arg(account->accountName())); ui.user->setText(account->user());