| 48 | } |
| 49 | |
| 50 | void INISettingsObject::changeSetting(const Setting &setting, QVariant value) |
| 51 | { |
| 52 | if (contains(setting.id())) |
| 53 | { |
| 54 | // valid value -> set the main config, remove all the sysnonyms |
| 55 | if (value.isValid()) |
| 56 | { |
| 57 | auto list = setting.configKeys(); |
| 58 | m_ini.set(list.takeFirst(), value); |
| 59 | for(auto iter: list) |
| 60 | m_ini.remove(iter); |
| 61 | } |
| 62 | // invalid -> remove all (just like resetSetting) |
| 63 | else |
| 64 | { |
| 65 | for(auto iter: setting.configKeys()) |
| 66 | m_ini.remove(iter); |
| 67 | } |
| 68 | doSave(); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | void INISettingsObject::doSave() |
| 73 | { |
nothing calls this directly
no test coverage detected