Skip to content
Snippets Groups Projects
Commit 7e251362 authored by Luni-4's avatar Luni-4 :speech_balloon:
Browse files

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

parent d8e4a693
No related branches found
No related tags found
1 merge request!2Add a message box if the project path is not found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment