From 2f0e025080dfcfa7c8f7395692502ab80d88ed65 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Thu, 5 Mar 2015 14:35:21 +0100 Subject: [PATCH] Convert menu items to new style Qt Signal connects --- src/gui/Mainwindow.cxx | 12 ++++++------ src/gui/qt.hxx | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index 3b805d5..625e7ac 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -27,12 +27,12 @@ Mainwindow::Mainwindow(InformationManager* mgr) saveAction = new QAction(tr("&Save"), this); exitAction = new QAction(tr("E&xit"), this); - connect(openAction, SIGNAL(triggered()), - this, SLOT(open())); - connect(saveAction, SIGNAL(triggered()), - this, SLOT(save())); - connect(exitAction, SIGNAL(triggered()), - qApp, SLOT(quit())); + connect(openAction, &QAction::triggered, + this, &Mainwindow::open); + connect(saveAction, &QAction::triggered, + this, &Mainwindow::save); + connect(exitAction, &QAction::triggered, + qApp, &QApplication::quit); fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->addAction(openAction); diff --git a/src/gui/qt.hxx b/src/gui/qt.hxx index ae370d5..ac08c0b 100644 --- a/src/gui/qt.hxx +++ b/src/gui/qt.hxx @@ -27,5 +27,6 @@ #include #include #include +#include #endif /* INCLUDE__qt_hxx_ */ -- 2.39.2