From 7cabc7df1836653aaf9e6eeac36e3f7650b6faf2 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 18 Jul 2016 22:55:18 +0300 Subject: [PATCH] Fixed loading recent files in main window. --HG-- branch : develop --- src/app/valentina/mainwindow.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index fd3985e67..7235ac556 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3636,13 +3636,12 @@ void MainWindow::CreateActions() { recentFileActs[i] = new QAction(this); recentFileActs[i]->setVisible(false); - connect(recentFileActs[i], &QAction::triggered, [this]() + connect(recentFileActs[i], &QAction::triggered, this, [this]() { - QAction *action = qobject_cast(sender()); - if (action) + if (QAction *action = qobject_cast(sender())) { const QString filePath = action->data().toString(); - if (not filePath.isEmpty()) + if (not filePath.isEmpty()) { LoadPattern(filePath); }