X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainpage.cpp;h=fe4f8a51a6630bd2074276c41def45bbdec54f65;hp=4838e251fb573d57ce433bb07ce873525ee61f3e;hb=f9efdde7f3a6004af8f834c409cfa6ae1d877692;hpb=1b09aae7fe4eb3b560f87d3b1c1698e6bc91257b diff --git a/src/qtui/mainpage.cpp b/src/qtui/mainpage.cpp index 4838e251..fe4f8a51 100644 --- a/src/qtui/mainpage.cpp +++ b/src/qtui/mainpage.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 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,30 +18,32 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include "mainpage.h" + #include #include #include #include #include -#include "mainpage.h" -#include "coreconnectdlg.h" #include "client.h" +#include "coreconnectdlg.h" +#include "icon.h" MainPage::MainPage(QWidget *parent) : QWidget(parent) { - QVBoxLayout *layout = new QVBoxLayout(this); + auto *layout = new QVBoxLayout(this); layout->setAlignment(Qt::AlignCenter); QLabel *label = new QLabel(this); label->setPixmap(QPixmap(":/pics/quassel-logo.png")); layout->addWidget(label); if (Quassel::runMode() != Quassel::Monolithic) { - _connectButton = new QPushButton(QIcon::fromTheme("network-connect"), tr("Connect to Core...")); + _connectButton = new QPushButton(icon::get("network-connect"), tr("Connect to Core...")); _connectButton->setEnabled(Client::coreConnection()->state() == CoreConnection::Disconnected); - connect(Client::coreConnection(), SIGNAL(stateChanged(CoreConnection::ConnectionState)), this, SLOT(coreConnectionStateChanged())); - connect(_connectButton, SIGNAL(clicked(bool)), this, SLOT(showCoreConnectionDlg())); + connect(Client::coreConnection(), &CoreConnection::stateChanged, this, &MainPage::coreConnectionStateChanged); + connect(_connectButton, &QAbstractButton::clicked, this, &MainPage::showCoreConnectionDlg); layout->addWidget(_connectButton); } }