[vlmc-devel] Remove vlmc version from settings

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 16:17:46 2014 +0200| [29491d638536f520c92a36b8fc4f24fac14559af] | committer: Hugo Beauzée-Luyssen

Remove vlmc version from settings

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

 src/Gui/MainWindow.cpp |   19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 712c1d5..fa5344f 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -89,7 +89,6 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
     Project::getInstance()->projectManager()->setProjectManagerUi( new GUIProjectManager );
     //All preferences have been created: restore them:
     loadVlmcPreferences();
-    Core::getInstance()->settings()->setValue( "private/VlmcVersion", PROJECT_VERSION_MAJOR );
 
     // GUI
     DockWidgetManager::getInstance( this )->setMainWindow( this );
@@ -328,26 +327,16 @@ 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/VlmcVersion", PROJECT_VERSION_MAJOR );
 }
 
 void MainWindow::loadVlmcPreferences()
 {
     //Load saved preferences :
     loadVlmcPreferencesCategory( "private" );
-    if ( VLMC_GET_STRING( "private/VlmcVersion" ) == PROJECT_VERSION_MAJOR )
-    {
-        loadVlmcPreferencesCategory( "keyboard" );
-        loadVlmcPreferencesCategory( "vlmc" );
-        loadVlmcPreferencesCategory( "youtube" );
-        loadVlmcPreferencesCategory( "network" );
-    }
-    else
-    {
-        QSettings s;
-        s.clear();
-    }
-    Core::getInstance()->settings()->setValue( "private/VlmcVersion", PROJECT_VERSION_MAJOR );
+    loadVlmcPreferencesCategory( "keyboard" );
+    loadVlmcPreferencesCategory( "vlmc" );
+    loadVlmcPreferencesCategory( "youtube" );
+    loadVlmcPreferencesCategory( "network" );
 }
 
 void



More information about the Vlmc-devel mailing list