diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-06-01 22:44:44 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2016-06-07 12:33:48 +0000 |
commit | daf715d9cae1c297ea50587c9e40c0f24bd59a07 (patch) | |
tree | c2b34cea4e9b169e1aa2c2e26872e92374af1c7c /src/app/config-ui | |
parent | ddc360f424720799c26ce47d49f13929e00af2df (diff) |
Use Qt5-style connects
The heavy lifting was done by clazy.
Change-Id: Ibb13c517567b1b32bbda6d26225454d1b003934d
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/app/config-ui')
-rw-r--r-- | src/app/config-ui/mainwindow.cpp | 16 | ||||
-rw-r--r-- | src/app/config-ui/mainwindow.h | 3 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/app/config-ui/mainwindow.cpp b/src/app/config-ui/mainwindow.cpp index 5b6319c4f..07143f96e 100644 --- a/src/app/config-ui/mainwindow.cpp +++ b/src/app/config-ui/mainwindow.cpp @@ -49,9 +49,9 @@ MainWindow::MainWindow(const QString &settingsDir, QWidget *parent) m_model = new qbs::SettingsModel(settingsDir, this); ui->treeView->setModel(m_model); ui->treeView->setContextMenuPolicy(Qt::CustomContextMenu); - connect(ui->treeView, SIGNAL(expanded(QModelIndex)), SLOT(adjustColumns())); - connect(ui->treeView, SIGNAL(customContextMenuRequested(QPoint)), - SLOT(provideContextMenu(QPoint))); + connect(ui->treeView, &QTreeView::expanded, this, &MainWindow::adjustColumns); + connect(ui->treeView, &QWidget::customContextMenuRequested, + this, &MainWindow::provideContextMenu); adjustColumns(); QMenu * const fileMenu = menuBar()->addMenu(tr("&File")); @@ -59,20 +59,20 @@ MainWindow::MainWindow(const QString &settingsDir, QWidget *parent) QAction * const reloadAction = new QAction(tr("&Reload"), this); reloadAction->setShortcut(QKeySequence::Refresh); - connect(reloadAction, SIGNAL(triggered()), SLOT(reloadSettings())); + connect(reloadAction, &QAction::triggered, this, &MainWindow::reloadSettings); QAction * const saveAction = new QAction(tr("&Save"), this); saveAction->setShortcut(QKeySequence::Save); - connect(saveAction, SIGNAL(triggered()), SLOT(saveSettings())); + connect(saveAction, &QAction::triggered, this, &MainWindow::saveSettings); QAction * const expandAllAction = new QAction(tr("&Expand All"), this); expandAllAction->setShortcut(Qt::CTRL | Qt::Key_E); - connect(expandAllAction, SIGNAL(triggered()), SLOT(expandAll())); + connect(expandAllAction, &QAction::triggered, this, &MainWindow::expandAll); QAction * const collapseAllAction = new QAction(tr("C&ollapse All"), this); collapseAllAction->setShortcut(Qt::CTRL | Qt::Key_O); - connect(collapseAllAction, SIGNAL(triggered()), SLOT(collapseAll())); + connect(collapseAllAction, &QAction::triggered, this, &MainWindow::collapseAll); QAction * const exitAction = new QAction(tr("E&xit"), this); exitAction->setShortcut(QKeySequence::Quit); exitAction->setMenuRole(QAction::QuitRole); - connect(exitAction, SIGNAL(triggered()), SLOT(exit())); + connect(exitAction, &QAction::triggered, this, &MainWindow::exit); fileMenu->addAction(reloadAction); fileMenu->addAction(saveAction); diff --git a/src/app/config-ui/mainwindow.h b/src/app/config-ui/mainwindow.h index 32ee143c4..2f5c6306f 100644 --- a/src/app/config-ui/mainwindow.h +++ b/src/app/config-ui/mainwindow.h @@ -49,7 +49,7 @@ public: bool eventFilter(QObject *watched, QEvent *event); -private slots: +private: void adjustColumns(); void expandAll(); void collapseAll(); @@ -58,7 +58,6 @@ private slots: void exit(); void provideContextMenu(const QPoint &pos); -private: Ui::MainWindow *ui; qbs::SettingsModel *m_model; }; |