mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 22:42:05 +02:00
Don't forward a change to QSetting if the setting didn't change
This considerably reduces the number of disk writes
This commit is contained in:
parent
f7ab2be173
commit
d722650806
1 changed files with 4 additions and 1 deletions
|
@ -33,7 +33,10 @@ namespace Setting {
|
|||
//qCDebug(settings_writer) << "Setting config " << key << "to" << value;
|
||||
|
||||
init();
|
||||
_qSettings->setValue(key, value);
|
||||
|
||||
if (!_qSettings->contains(key) || _qSettings->value(key) != value) {
|
||||
_qSettings->setValue(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteWorker::removeKey(const QString key) {
|
||||
|
|
Loading…
Reference in a new issue