[vlmc-devel] Do not create VLMC settings from ProjectManager.

Hugo Beauzée-Luyssen git at videolan.org
Sat Mar 29 16:19:43 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sat Mar 29 17:15:16 2014 +0200| [3d5709f80009c3e122e379bd5e7c7e1b77ec1ae2] | committer: Hugo Beauzée-Luyssen

Do not create VLMC settings from ProjectManager.

Only projects settings should be created there

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

 src/Gui/MainWindow.cpp         |   11 +++++++++++
 src/Project/ProjectManager.cpp |   13 ++-----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 735e6fb..31287a3 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -325,6 +325,17 @@ MainWindow::initVlmcPreferences()
     VLMC_CREATE_PRIVATE_PREFERENCE_STRING( "private/ImportPreviouslySelectPath", QDir::homePath() );
     VLMC_CREATE_PRIVATE_PREFERENCE_BYTEARRAY( "private/MainWindowGeometry", "" );
     VLMC_CREATE_PRIVATE_PREFERENCE_BYTEARRAY( "private/MainWindowState", "" );
+    VLMC_CREATE_PRIVATE_PREFERENCE_STRING( "private/RecentsProjects", "" );
+
+    Core::getInstance()->settings()->createVar( SettingValue::Bool, "vlmc/AutomaticBackup", false,
+                                 QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save" ),
+                                 QT_TRANSLATE_NOOP( "PreferenceWidget", "When this option is activated,"
+                                             "VLMC will automatically save your project "
+                                             "at a specified interval" ), SettingValue::Nothing );
+    Core::getInstance()->settings()->createVar( SettingValue::Int, "vlmc/AutomaticBackupInterval", 5,
+                                QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save interval" ),
+                                QT_TRANSLATE_NOOP( "PreferenceWidget", "This is the interval that VLMC will wait "
+                                            "between two automatic save" ), SettingValue::Nothing );
 }
 
 #undef CREATE_MENU_SHORTCUT
diff --git a/src/Project/ProjectManager.cpp b/src/Project/ProjectManager.cpp
index 0cc1fc5..be933d2 100644
--- a/src/Project/ProjectManager.cpp
+++ b/src/Project/ProjectManager.cpp
@@ -55,8 +55,6 @@ ProjectManager::ProjectManager( Settings* projectSettings, Settings* vlmcSetting
     , m_projectSettings( projectSettings )
     , m_vlmcSettings( vlmcSettings )
 {
-    vlmcSettings->createVar( SettingValue::String, SETTINGS_RECENTS, "", "", "", SettingValue::Private );
-
     SettingValue    *fps = projectSettings->createVar( SettingValue::Double, "video/VLMCOutputFPS", 29.97,
                                 QT_TRANSLATE_NOOP( "PreferenceWidget", "Output video FPS" ),
                                 QT_TRANSLATE_NOOP( "PreferenceWidget", "Frame Per Second used when previewing and rendering the project" ),
@@ -95,18 +93,11 @@ ProjectManager::ProjectManager( Settings* projectSettings, Settings* vlmcSetting
 
     m_timer = new QTimer( this );
     connect( m_timer, SIGNAL( timeout() ), this, SLOT( autoSaveRequired() ) );
-    vlmcSettings->createVar( SettingValue::Bool, "vlmc/AutomaticBackup", false,
-                                 QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save" ),
-                                 QT_TRANSLATE_NOOP( "PreferenceWidget", "When this option is activated,"
-                                             "VLMC will automatically save your project "
-                                             "at a specified interval" ), SettingValue::Nothing );
+
     vlmcSettings->watchValue( "vlmc/AutomaticBackup", this,
                                                 SLOT( automaticSaveEnabledChanged(QVariant) ),
                                                 Qt::QueuedConnection );
-    vlmcSettings->createVar( SettingValue::Int, "vlmc/AutomaticBackupInterval", 5,
-                                QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save interval" ),
-                                QT_TRANSLATE_NOOP( "PreferenceWidget", "This is the interval that VLMC will wait "
-                                            "between two automatic save" ), SettingValue::Nothing );
+
     vlmcSettings->watchValue( "vlmc/AutomaticBackupInterval", this,
                                                 SLOT( automaticSaveIntervalChanged(QVariant) ),
                                                 Qt::QueuedConnection );



More information about the Vlmc-devel mailing list