[vlmc-devel] RecentProjects: Fix the recent projects menu not being created when a project is not loaded

Yikai Lu git at videolan.org
Tue Jun 20 17:55:54 CEST 2017


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Jun 20 23:30:07 2017 +0900| [2c8384a3e0bf22ba2d7a765d51392ece141a8c01] | committer: Yikai Lu

RecentProjects: Fix the recent projects menu not being created when a project is not loaded

> https://code.videolan.org/videolan/vlmc/commit/2c8384a3e0bf22ba2d7a765d51392ece141a8c01
---

 src/Project/RecentProjects.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/Project/RecentProjects.cpp b/src/Project/RecentProjects.cpp
index 1aacdf78..b857fe83 100644
--- a/src/Project/RecentProjects.cpp
+++ b/src/Project/RecentProjects.cpp
@@ -32,6 +32,7 @@ RecentProjects::RecentProjects( Settings* vlmcSettings, QObject *parent )
 {
     m_recentsProjects = vlmcSettings->createVar( SettingValue::List, "private/RecentsProjects", QVariantList(),
                                                 "", "", SettingValue::Private );
+    connect( m_recentsProjects, &SettingValue::changed, this, &RecentProjects::updated );
 }
 
 QString
@@ -62,7 +63,6 @@ RecentProjects::remove( const QString &projectFile )
         }
     }
     m_recentsProjects->set( l );
-    emit updated();
 }
 
 void
@@ -76,5 +76,4 @@ RecentProjects::projectLoaded( const QString& projectName, const QString& projec
     l.removeAll( var );
     l.insert( 0, var );
     m_recentsProjects->set( l );
-    emit updated();
 }



More information about the Vlmc-devel mailing list