[vlmc-devel] ProjectManager: If project file does not exist, remove from recent files list.
Rohit Yadav
git at videolan.org
Fri Feb 11 04:38:49 CET 2011
vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Fri Feb 11 09:25:59 2011 +0530| [602786fbf2d728cc46cee8632bf78bf7d8a14731] | committer: Rohit Yadav
ProjectManager: If project file does not exist, remove from recent files list.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=602786fbf2d728cc46cee8632bf78bf7d8a14731
---
src/Gui/project/GuiProjectManager.cpp | 3 ---
src/Project/ProjectManager.cpp | 9 +++++++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/Gui/project/GuiProjectManager.cpp b/src/Gui/project/GuiProjectManager.cpp
index 7137566..9ddea18 100644
--- a/src/Gui/project/GuiProjectManager.cpp
+++ b/src/Gui/project/GuiProjectManager.cpp
@@ -311,8 +311,5 @@ GUIProjectManager::loadProject()
void
GUIProjectManager::removeProject( const QString &fileName )
{
- QFile projectFile( fileName );
- if ( !projectFile.exists() )
- return;
ProjectManager::removeProject( fileName );
}
diff --git a/src/Project/ProjectManager.cpp b/src/Project/ProjectManager.cpp
index a34aec3..8a818c8 100644
--- a/src/Project/ProjectManager.cpp
+++ b/src/Project/ProjectManager.cpp
@@ -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
More information about the Vlmc-devel
mailing list