[vlmc-devel] Settings: Call restoreDefaultValues() of settingsChildren when that of their parent is called

Yikai Lu git at videolan.org
Sun Apr 10 14:18:08 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sun Apr 10 18:39:41 2016 +0900| [41158d88b7ae3dad93246eec9e7eff07777ac0ad] | committer: Hugo Beauzée-Luyssen

Settings: Call restoreDefaultValues() of settingsChildren when that of their parent is called

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> https://code.videolan.org/videolan/vlmc/commit/41158d88b7ae3dad93246eec9e7eff07777ac0ad
---

 src/Settings/Settings.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/Settings/Settings.cpp b/src/Settings/Settings.cpp
index cbe5bd7..b8cef75 100644
--- a/src/Settings/Settings.cpp
+++ b/src/Settings/Settings.cpp
@@ -203,6 +203,8 @@ Settings::restoreDefaultValues()
     {
         s->restoreDefault();
     }
+    for ( auto &pair : m_settingsChildren )
+        pair.second->restoreDefaultValues();
 }
 SettingValue*
 Settings::value(const QString &key)



More information about the Vlmc-devel mailing list