[vlmc-devel] Remove some QSettings left over

Hugo Beauzée-Luyssen git at videolan.org
Sun Feb 9 19:44:26 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Feb  9 20:43:27 2014 +0200| [fc14a409f540aab9ceacdf518039fdcaa47ea0a5] | committer: Hugo Beauzée-Luyssen

Remove some QSettings left over

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

 src/Gui/wizard/WelcomePage.cpp |    5 +----
 src/Project/ProjectManager.cpp |    4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/Gui/wizard/WelcomePage.cpp b/src/Gui/wizard/WelcomePage.cpp
index ab89604..f94662b 100644
--- a/src/Gui/wizard/WelcomePage.cpp
+++ b/src/Gui/wizard/WelcomePage.cpp
@@ -31,7 +31,6 @@
 #include <QVBoxLayout>
 #include <QMessageBox>
 #include <QFileInfo>
-#include <QSettings>
 
 QString* WelcomePage::m_projectPath = NULL;
 
@@ -88,9 +87,7 @@ WelcomePage::nextId() const
 void
 WelcomePage::initializePage()
 {
-    QSettings s;
-
-    m_ui.hideStartupCheckBox->setChecked( !s.value( "ShowWizardStartup", true ).toBool() );
+    m_ui.hideStartupCheckBox->setChecked( !VLMC_GET_BOOL( "private/ShowWizardStartup" ) );
     m_ui.createRadioButton->setChecked( true );
     loadRecentsProjects();
 }
diff --git a/src/Project/ProjectManager.cpp b/src/Project/ProjectManager.cpp
index c3ac507..d81d979 100644
--- a/src/Project/ProjectManager.cpp
+++ b/src/Project/ProjectManager.cpp
@@ -34,7 +34,6 @@
 
 #include <QDir>
 #include <QMessageBox>
-#include <QSettings>
 
 #include <errno.h>
 #include <signal.h>
@@ -233,8 +232,7 @@ ProjectManager::appendToRecentProject( const QString& projectName )
     while ( m_recentsProjects.count() > 15 )
         m_recentsProjects.removeLast();
 
-    QSettings s;
-    s.setValue( "RecentsProjects", m_recentsProjects );
+    SettingsManager::getInstance()->setValue( "private/RecentsProjects", m_recentsProjects, SettingsManager::Vlmc );
 }
 
 QString



More information about the Vlmc-devel mailing list