From 237b1fd9b8bdeec9ccdf0b419dc4f7aa1fe8c4cf Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Fri, 28 Jun 2019 13:25:22 +0200 Subject: [PATCH] Simplify code --- src/MainWindow.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 21f8d2c8..41fcf56f 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -251,7 +251,7 @@ void MainWindow::init() for(int i = 0; i < MaxRecentFiles; ++i) { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); - connect(recentFileActs[i], SIGNAL(triggered()), this, SLOT(openRecentFile())); + connect(recentFileActs[i], &QAction::triggered, this, &MainWindow::openRecentFile); } for(int i = 0; i < MaxRecentFiles; ++i) ui->fileMenu->insertAction(ui->fileExitAction, recentFileActs[i]); @@ -1925,8 +1925,7 @@ void MainWindow::updateRecentFileActions() // Check if files still exist and remove any non-existent file for(int i=0;i