[vlmc-devel] ProjectManager: Remove the unsaved project concept.

Hugo Beauzée-Luyssen git at videolan.org
Mon Mar 31 17:59:20 CEST 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Mar 30 22:10:42 2014 +0300| [17ec00d6f7ab82ea5a47e44b56bb6fbb86c86cde] | committer: Hugo Beauzée-Luyssen

ProjectManager: Remove the unsaved project concept.

It is now mandatory to create a project before editing

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=17ec00d6f7ab82ea5a47e44b56bb6fbb86c86cde
---

 src/Project/ProjectManager.cpp |   12 ++++--------
 src/Project/ProjectManager.h   |    2 +-
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/Project/ProjectManager.cpp b/src/Project/ProjectManager.cpp
index b832460..7016463 100644
--- a/src/Project/ProjectManager.cpp
+++ b/src/Project/ProjectManager.cpp
@@ -45,7 +45,6 @@
 #define SETTINGS_BACKUP "private/EmergencyBackup"
 
 const QString   ProjectManager::unNamedProject = ProjectManager::tr( "Untitled Project" );
-const QString   ProjectManager::unSavedProject = ProjectManager::tr( "Unsaved Project" );
 const QString   ProjectManager::backupSuffix = "~";
 
 ProjectManager::ProjectManager( Settings* projectSettings, Settings* vlmcSettings )
@@ -203,15 +202,12 @@ ProjectManager::createAutoSaveOutputFileName( const QString& baseName ) const
 QString
 ProjectManager::projectName() const
 {
-    //FIXME: Can this be true?
     if ( m_projectName.isEmpty() == true )
     {
-        if ( m_projectFile != NULL )
-        {
-            QFileInfo       fInfo( *m_projectFile );
-            return fInfo.baseName();
-        }
-        return ProjectManager::unSavedProject;
+        Q_ASSERT( m_projectFile != NULL );
+
+        QFileInfo       fInfo( *m_projectFile );
+        return fInfo.baseName();
     }
     return m_projectName;
 }
diff --git a/src/Project/ProjectManager.h b/src/Project/ProjectManager.h
index 59491f8..71eb70d 100644
--- a/src/Project/ProjectManager.h
+++ b/src/Project/ProjectManager.h
@@ -84,7 +84,6 @@ class   ProjectManager : public QObject
 
 public:
     static const QString            unNamedProject;
-    static const QString            unSavedProject;
     static const QString            backupSuffix;
 
 
@@ -164,6 +163,7 @@ signals:
      *      - The revision (if activated) has changed
      */
     void            projectUpdated( const QString& projectName, bool savedState );
+
     /**
      *  \brief      Used to signal that the project has been saved.
      *



More information about the Vlmc-devel mailing list