Fixed loading recent files in main window.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-07-18 22:55:18 +03:00
parent 18e0f6750a
commit 7cabc7df18

View File

@ -3636,10 +3636,9 @@ 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<QAction *>(sender());
if (action)
if (QAction *action = qobject_cast<QAction *>(sender()))
{
const QString filePath = action->data().toString();
if (not filePath.isEmpty())