modernize: Migrate action-related things to PMF connects
[quassel.git] / src / qtui / mainpage.cpp
index 9ebda87..fe4f8a5 100644 (file)
@@ -32,7 +32,7 @@
 
 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"));
@@ -42,8 +42,8 @@ MainPage::MainPage(QWidget *parent) : QWidget(parent)
         _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);
     }
 }