diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-07-16 00:30:32 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-07-16 00:30:32 +0200 |
commit | e2ee6d6d254285284f07b07cb60409fbda0bf7ad (patch) | |
tree | 30810ad496b34ae949aba3a72efb0a0363e8b718 /libsettings/src/inisettingsobject.cpp | |
parent | b5450042b5f9ddaad7585f644591b7d009aeb5cb (diff) | |
download | MultiMC-e2ee6d6d254285284f07b07cb60409fbda0bf7ad.tar MultiMC-e2ee6d6d254285284f07b07cb60409fbda0bf7ad.tar.gz MultiMC-e2ee6d6d254285284f07b07cb60409fbda0bf7ad.tar.lz MultiMC-e2ee6d6d254285284f07b07cb60409fbda0bf7ad.tar.xz MultiMC-e2ee6d6d254285284f07b07cb60409fbda0bf7ad.zip |
Finalize the instance settings dialog, add setting reset mechanism
Diffstat (limited to 'libsettings/src/inisettingsobject.cpp')
-rw-r--r-- | libsettings/src/inisettingsobject.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libsettings/src/inisettingsobject.cpp b/libsettings/src/inisettingsobject.cpp index 17b132a3..854421b6 100644 --- a/libsettings/src/inisettingsobject.cpp +++ b/libsettings/src/inisettingsobject.cpp @@ -40,6 +40,15 @@ void INISettingsObject::changeSetting(const Setting &setting, QVariant value) } } +void INISettingsObject::resetSetting ( const Setting& setting ) +{ + if (contains(setting.id())) + { + m_ini.remove(setting.configKey()); + m_ini.saveFile(m_filePath); + } +} + QVariant INISettingsObject::retrieveValue(const Setting &setting) { if (contains(setting.id())) |