| 68 | } |
| 69 | |
| 70 | void INISettingsObject::changeSetting(const Setting& setting, QVariant value) |
| 71 | { |
| 72 | if (contains(setting.id())) { |
| 73 | // valid value -> set the main config, remove all the sysnonyms |
| 74 | if (value.isValid()) { |
| 75 | auto list = setting.configKeys(); |
| 76 | m_ini.set(list.takeFirst(), value); |
| 77 | for (auto iter : list) |
| 78 | m_ini.remove(iter); |
| 79 | } |
| 80 | // invalid -> remove all (just like resetSetting) |
| 81 | else { |
| 82 | for (auto iter : setting.configKeys()) |
| 83 | m_ini.remove(iter); |
| 84 | } |
| 85 | doSave(); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | void INISettingsObject::doSave() |
| 90 | { |
nothing calls this directly
no test coverage detected