Commit 7e251362 authored by Luni-4's avatar Luni-4 💬

MainWindow: Add a message box if the project path is not found

parent d8e4a693
......@@ -875,7 +875,17 @@ MainWindow::updateRecentProjects()
);
connect( action, &QAction::triggered, this, [this, file]()
{
Core::instance()->project()->load( file );
if ( QFile::exists( file ) == false )
{
QMessageBox::warning( this, tr( "Project file missing" ),
QStringLiteral( "%1\n%2" )
.arg( tr( "Sorry, we couldn't find your file. Was it moved, renamed, or deleted?" ) )
.arg( file ) );
}
else
{
Core::instance()->project()->load( file );
}
} );
}
m_ui.actionRecent_Projects->setMenu( menu );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment