From 4a7857f9f66cc471defe22549c7af813f844b6fc Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 5 Jun 2019 14:05:02 +0200 Subject: Use Qt5 style signal/slot connections --- src/dialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/dialog.cpp') diff --git a/src/dialog.cpp b/src/dialog.cpp index 5e68e10..5e7a6b0 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -48,7 +48,7 @@ Dialog::Dialog(QWidget *parent) QRect desktopRect = QApplication::desktop()->availableGeometry(this); oldCenter_ = desktopRect.center(); centerTimer_ = new QTimer(this); - connect(centerTimer_, SIGNAL(timeout()), this, SLOT(onCenterTimer())); + connect(centerTimer_, &QTimer::timeout, this, &Dialog::onCenterTimer); centerTimer_->start(1000); ui->treeView->setFocusProxy(ui->filterEdit); @@ -100,8 +100,8 @@ Dialog::Dialog(QWidget *parent) // TODO: Implement bug report dialog :) ui->buttonBugReport->setEnabled(false); - QObject::connect(SessionsIconHolder::get(), SIGNAL(iconDownloaded(const QUrl&, const QIcon&)), - this, SLOT(iconDownloaded(const QUrl&, const QIcon&))); + QObject::connect(SessionsIconHolder::get(), &SessionsIconHolder::iconDownloaded, + this, &Dialog::iconDownloaded); } @@ -789,8 +789,8 @@ void Dialog::setListModel(SessionTreeModel *model) { } // reconnect the treeModel - QObject::connect(ui->treeView->selectionModel(), SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), - this, SLOT(treeView_selectionChanged(const QModelIndex&, const QModelIndex&))); + QObject::connect(ui->treeView->selectionModel(), &QItemSelectionModel::currentChanged, + this, &Dialog::treeView_selectionChanged); // select the first element, if no element is selected if (ui->treeView->selectionModel()->selectedRows().count() == 0) { -- cgit v1.2.3-55-g7522