[vlmc-devel] Project: Pass projectName and projectFilePath on the projectSaved signal

Yikai Lu git at videolan.org
Tue Aug 23 18:01:11 CEST 2016


vlmc | branch: medialibrary | Yikai Lu <luyikei.qmltu at gmail.com> | Sun Aug 21 18:41:24 2016 -0500| [f34b07394d67b59e2dec7f00d2cd427cb05af739] | committer: Hugo Beauzée-Luyssen

Project: Pass projectName and projectFilePath on the projectSaved signal

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/f34b07394d67b59e2dec7f00d2cd427cb05af739
---

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

diff --git a/src/Project/Project.cpp b/src/Project/Project.cpp
index 1576a5e..8ca3bba 100644
--- a/src/Project/Project.cpp
+++ b/src/Project/Project.cpp
@@ -227,8 +227,9 @@ void
 Project::saveProject( const QString& fileName )
 {
     m_settings->setSettingsFile( fileName );
-    m_settings->save();
-    emit projectSaved();
+    bool ret = m_settings->save();
+    if ( ret == true )
+        emit projectSaved( m_settings->value( "vlmc/ProjectName" )->get().toString(), fileName );
 }
 
 void
diff --git a/src/Project/Project.h b/src/Project/Project.h
index 0481ae4..42a4e69 100644
--- a/src/Project/Project.h
+++ b/src/Project/Project.h
@@ -106,10 +106,8 @@ class Project : public QObject
 
         /**
          *  \brief      Used to signal that the project has been saved.
-         *
-         *  Right now, it is only used by the undo stack to flag the current state as clean.
          */
-        void                projectSaved();
+        void                projectSaved( const QString& projectName, const QString& projectFilePath );
 
         /**
           * @brief cleanStateChanged    Emited when the clean state changes.



More information about the Vlmc-devel mailing list