[vlmc-devel] Rename Core::currentProject to Core::project

Hugo Beauzée-Luyssen git at videolan.org
Fri Mar 4 17:14:22 CET 2016


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Mar  4 16:58:50 2016 +0100| [52067b62ae1628b25a18d73923ed0f956a76ebfd] | committer: Hugo Beauzée-Luyssen

Rename Core::currentProject to Core::project

> https://code.videolan.org/videolan/vlmc/commit/52067b62ae1628b25a18d73923ed0f956a76ebfd
---

 src/Gui/MainWindow.cpp           | 18 +++++++++---------
 src/Gui/wizard/ProjectWizard.cpp |  2 +-
 src/Main/Core.cpp                |  2 +-
 src/Main/Core.h                  |  2 +-
 src/Settings/Settings.h          | 10 +++++-----
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 2251f3f..4873b5b 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -107,11 +107,11 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
     connect( this, SIGNAL( toolChanged( ToolButtons ) ),
              m_timeline, SLOT( setTool( ToolButtons ) ) );
 
-    connect( Core::getInstance()->currentProject(), SIGNAL( projectUpdated(QString) ),
+    connect( Core::getInstance()->project(), SIGNAL( projectUpdated(QString) ),
              this, SLOT( projectUpdated( QString ) ) );
-    connect( Core::getInstance()->currentProject(), SIGNAL( outdatedBackupFileFound() ),
+    connect( Core::getInstance()->project(), SIGNAL( outdatedBackupFileFound() ),
              this, SLOT( onOudatedBackupFile() ) );
-    connect( Core::getInstance()->currentProject(), SIGNAL( backupProjectLoaded() ),
+    connect( Core::getInstance()->project(), SIGNAL( backupProjectLoaded() ),
              this, SLOT( onBackupFileLoaded() ) );
 
     //Connecting Library stuff:
@@ -331,7 +331,7 @@ MainWindow::initVlmcPreferences()
 void
 MainWindow::on_actionSave_triggered()
 {
-    Core::getInstance()->currentProject()->save();
+    Core::getInstance()->project()->save();
 }
 
 void
@@ -342,7 +342,7 @@ MainWindow::on_actionSave_As_triggered()
                                   QString(), QObject::tr( "VLMC project file(*.vlmc)" ) );
     if ( dest.isEmpty() == true )
         return;
-    Core::getInstance()->currentProject()->saveAs( dest );
+    Core::getInstance()->project()->saveAs( dest );
 }
 
 void
@@ -523,7 +523,7 @@ MainWindow::loadGlobalProxySettings()
 void
 MainWindow::createProjectPreferences()
 {
-    m_projectPreferences = new SettingsDialog( Core::getInstance()->currentProject()->settings(), tr( "Project preferences" ), this );
+    m_projectPreferences = new SettingsDialog( Core::getInstance()->project()->settings(), tr( "Project preferences" ), this );
     m_projectPreferences->addCategory( "general", QT_TRANSLATE_NOOP( "Settings", "General" ), QIcon( ":/images/vlmc" ) );
     m_projectPreferences->addCategory( "video", QT_TRANSLATE_NOOP( "Settings", "Video" ), QIcon( ":/images/video" ) );
     m_projectPreferences->addCategory( "audio", QT_TRANSLATE_NOOP( "Settings", "Audio" ), QIcon( ":/images/audio" ) );
@@ -758,7 +758,7 @@ MainWindow::saveSettings()
 void
 MainWindow::closeEvent( QCloseEvent* e )
 {
-    if ( Core::getInstance()->currentProject()->isClean() == false )
+    if ( Core::getInstance()->project()->isClean() == false )
     {
         QMessageBox msgBox;
         msgBox.setText( QObject::tr( "The project has been modified." ) );
@@ -769,7 +769,7 @@ MainWindow::closeEvent( QCloseEvent* e )
         switch ( ret )
         {
         case QMessageBox::Save:
-            Core::getInstance()->currentProject()->save();
+            Core::getInstance()->project()->save();
             break;
         case QMessageBox::Discard:
             break;
@@ -870,7 +870,7 @@ MainWindow::onOudatedBackupFile()
                                      "Do you want to erase it?" ),
                                     QMessageBox::Ok | QMessageBox::No ) == QMessageBox::Ok )
     {
-        Core::getInstance()->currentProject()->removeBackupFile();
+        Core::getInstance()->project()->removeBackupFile();
     }
 }
 
diff --git a/src/Gui/wizard/ProjectWizard.cpp b/src/Gui/wizard/ProjectWizard.cpp
index 7e800e3..79b436f 100644
--- a/src/Gui/wizard/ProjectWizard.cpp
+++ b/src/Gui/wizard/ProjectWizard.cpp
@@ -100,7 +100,7 @@ ProjectWizard::accept()
     if ( currentId() == Page_Video )
     {
         Core::getInstance()->newProject( field( "projectName" ).toString(), field( "projectPath" ).toString() );
-        Settings* projectPreferences = Core::getInstance()->currentProject()->settings();
+        Settings* projectPreferences = Core::getInstance()->project()->settings();
 
         projectPreferences->setValue( "video/VLMCOutputFPS", field( "fps" ) );
         projectPreferences->setValue( "video/VideoProjectHeight", field( "height" ) );
diff --git a/src/Main/Core.cpp b/src/Main/Core.cpp
index f76d2ff..d1fac98 100644
--- a/src/Main/Core.cpp
+++ b/src/Main/Core.cpp
@@ -165,7 +165,7 @@ Core::workspace()
     return m_workspace;
 }
 
-Project* Core::currentProject()
+Project* Core::project()
 {
     return m_currentProject;
 }
diff --git a/src/Main/Core.h b/src/Main/Core.h
index 2979791..b4e26e0 100644
--- a/src/Main/Core.h
+++ b/src/Main/Core.h
@@ -56,7 +56,7 @@ class Core : public QObject
         RecentProjects*         recentProjects();
         AutomaticBackup*        automaticBackup();
         Workspace*              workspace();
-        Project*                currentProject();
+        Project*                project();
         WorkflowRenderer*       workflowRenderer();
         MainWorkflow*           workflow();
         QUndoStack*             undoStack();
diff --git a/src/Settings/Settings.h b/src/Settings/Settings.h
index 1e80536..65d368a 100644
--- a/src/Settings/Settings.h
+++ b/src/Settings/Settings.h
@@ -50,11 +50,11 @@ class QDomElement;
 #define VLMC_GET_STRINGLIST( key )  Core::getInstance()->settings()->value( key )->get().toStringList()
 #define VLMC_GET_BYTEARRAY( key )   Core::getInstance()->settings()->value( key )->get().toByteArray()
 
-#define VLMC_PROJECT_GET_STRING( key )  Core::getInstance()->currentProject()->settings()->value( key )->get().toString()
-#define VLMC_PROJECT_GET_INT( key )     Core::getInstance()->currentProject()->settings()->value( key )->get().toInt()
-#define VLMC_PROJECT_GET_UINT( key )    Core::getInstance()->currentProject()->settings()->value( key )->get().toUInt()
-#define VLMC_PROJECT_GET_DOUBLE( key )  Core::getInstance()->currentProject()->settings()->value( key )->get().toDouble()
-#define VLMC_PROJECT_GET_BOOL( key )    Core::getInstance()->currentProject()->settings()->value( key )->get().toBool()
+#define VLMC_PROJECT_GET_STRING( key )  Core::getInstance()->project()->settings()->value( key )->get().toString()
+#define VLMC_PROJECT_GET_INT( key )     Core::getInstance()->project()->settings()->value( key )->get().toInt()
+#define VLMC_PROJECT_GET_UINT( key )    Core::getInstance()->project()->settings()->value( key )->get().toUInt()
+#define VLMC_PROJECT_GET_DOUBLE( key )  Core::getInstance()->project()->settings()->value( key )->get().toDouble()
+#define VLMC_PROJECT_GET_BOOL( key )    Core::getInstance()->project()->settings()->value( key )->get().toBool()
 
 
 #define VLMC_CREATE_PROJECT_VAR( type, key, defaultValue, name, desc, flags )  \



More information about the Vlmc-devel mailing list