[vlmc-devel] commit: ProjectManager: Avoid connecting a signal more than once. ( Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sat Mar 27 17:39:53 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sat Mar 27 17:38:59 2010 +0100| [94e7d1edde3cee2f28e7f8b584899e3208b417f7] | committer: Hugo Beauzee-Luyssen 

ProjectManager: Avoid connecting a signal more than once.

This solves a crash when loading two project in the same session.

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

 src/Project/ProjectManager.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/Project/ProjectManager.cpp b/src/Project/ProjectManager.cpp
index 7786a55..f15c339 100644
--- a/src/Project/ProjectManager.cpp
+++ b/src/Project/ProjectManager.cpp
@@ -87,6 +87,8 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
     VLMC_CREATE_PROJECT_STRING( "general/VLMCWorkspace", QDir::homePath(), "Workspace location", "The place where all project's videos will be stored" );
 
     VLMC_CREATE_PROJECT_STRING( "general/ProjectName", unNamedProject, "Project name", "The project name" );
+
+    connect( Library::getInstance(), SIGNAL( projectLoaded() ), this, SLOT( loadTimeline() ) );
 }
 
 ProjectManager::~ProjectManager()
@@ -144,7 +146,6 @@ void    ProjectManager::loadProject( const QString& fileName )
 
     QDomElement     root = m_domDocument->documentElement();
 
-    connect( Library::getInstance(), SIGNAL( projectLoaded() ), this, SLOT( loadTimeline() ) );
     Library::getInstance()->loadProject( root );
 }
 



More information about the Vlmc-devel mailing list