Commit 602786fb authored by Rohit Yadav's avatar Rohit Yadav

ProjectManager: If project file does not exist, remove from recent files list.

parent fd2ab3b2
......@@ -311,8 +311,5 @@ GUIProjectManager::loadProject()
void
GUIProjectManager::removeProject( const QString &fileName )
{
QFile projectFile( fileName );
if ( !projectFile.exists() )
return;
ProjectManager::removeProject( fileName );
}
......@@ -172,11 +172,16 @@ ProjectManager::removeProject( const QString& fileName )
// Remove all occurence of fileName
m_recentsProjects.removeAll( fileName );
QSettings s;
s.setValue( "RecentsProjects", m_recentsProjects );
QFile projectFile( fileName );
if ( !projectFile.exists() )
return;
if( !QFile::remove( fileName ) )
QMessageBox::warning( NULL, tr( "Can't delete project file" ),
tr( "Can't delete this project file: %1\nPlease delete it manually." ).arg( fileName ) );
QSettings s;
s.setValue( "RecentsProjects", m_recentsProjects );
}
void
......
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