Commit 90970a4d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Core: Fix projectLoaded semantic. Turn it into projectLoading

parent df3cb278
...@@ -81,8 +81,8 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent ) ...@@ -81,8 +81,8 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
m_ui.setupUi( this ); m_ui.setupUi( this );
Core::getInstance()->logger()->setup(); Core::getInstance()->logger()->setup();
connect( Core::getInstance(), SIGNAL( projectLoaded( Project* ) ), connect( Core::getInstance(), SIGNAL( projectLoading( Project* ) ),
this, SLOT( onProjectLoaded( Project* ) ) ); this, SLOT( onProjectLoading( Project* ) ), Qt::DirectConnection );
//Preferences //Preferences
initVlmcPreferences(); initVlmcPreferences();
//All preferences have been created: restore them: //All preferences have been created: restore them:
...@@ -833,7 +833,7 @@ MainWindow::canRedoChanged( bool canRedo ) ...@@ -833,7 +833,7 @@ MainWindow::canRedoChanged( bool canRedo )
} }
void void
MainWindow::onProjectLoaded(Project* project) MainWindow::onProjectLoading(Project* project)
{ {
createProjectPreferences(); createProjectPreferences();
connect( project, SIGNAL( projectUpdated( const QString&, bool ) ), this, SLOT( projectUpdated( const QString&, bool ) ) ); connect( project, SIGNAL( projectUpdated( const QString&, bool ) ), this, SLOT( projectUpdated( const QString&, bool ) ) );
......
...@@ -159,7 +159,7 @@ private slots: ...@@ -159,7 +159,7 @@ private slots:
void cleanStateChanged( bool isClean ); void cleanStateChanged( bool isClean );
void canUndoChanged( bool canUndo ); void canUndoChanged( bool canUndo );
void canRedoChanged( bool canRedo ); void canRedoChanged( bool canRedo );
void onProjectLoaded( Project* project ); void onProjectLoading( Project* project );
signals: signals:
void toolChanged( ToolButtons ); void toolChanged( ToolButtons );
......
...@@ -101,7 +101,7 @@ Core::onProjectLoaded( Project* project ) ...@@ -101,7 +101,7 @@ Core::onProjectLoaded( Project* project )
m_automaticBackup->setProject( project ); m_automaticBackup->setProject( project );
m_recentProjects->setProject( project ); m_recentProjects->setProject( project );
emit projectLoaded( project ); emit projectLoading( project );
} }
Settings* Settings*
......
...@@ -55,7 +55,15 @@ class Core : public QObject, public Singleton<Core> ...@@ -55,7 +55,15 @@ class Core : public QObject, public Singleton<Core>
void onProjectLoaded( Project* project ); void onProjectLoaded( Project* project );
signals: signals:
void projectLoaded( Project* project ); /**
* @brief projectLoaded Will be emited right before a project starts loading.
*
* When this is emited, all Project related instances are created. The project itself
* however won't be loaded (no settings, no media, ...)
* This should be used with Qt::DirectConnection in order not to miss any media/clip
* loading events.
*/
void projectLoading( Project* project );
private: private:
Core(); Core();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment