[vlmc-devel] commit: SettingsManager: Don't save private vars ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Sun Jun 20 19:30:51 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Jun 20 19:30:46 2010 +0200| [60ce98a1626110d61d579e587dee4d00006d6f3f] | committer: Hugo Beauzée-Luyssen 

SettingsManager: Don't save private vars

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

 src/Settings/SettingsManager.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/Settings/SettingsManager.cpp b/src/Settings/SettingsManager.cpp
index 67e4c83..290c8fc 100644
--- a/src/Settings/SettingsManager.cpp
+++ b/src/Settings/SettingsManager.cpp
@@ -145,7 +145,11 @@ SettingsManager::save() const
     SettingHash::const_iterator ed = m_classicSettings.end();
 
     for ( ; it != ed; ++it )
+    {
+        if ( ( it.value()->flags() & SettingValue::Private ) != 0 )
+            continue ;
         sett.setValue( it.key(), it.value()->get() );
+    }
     sett.sync();
 }
 
@@ -158,6 +162,8 @@ SettingsManager::save( QXmlStreamWriter& project ) const
     project.writeStartElement( "project" );
     while ( it != end )
     {
+        if ( ( it.value()->flags() & SettingValue::Private ) != 0 )
+            continue ;
         project.writeStartElement( "property" );
         project.writeAttribute( "key", it.key() );
         project.writeAttribute( "value", it.value()->get().toString() );



More information about the Vlmc-devel mailing list