mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Use proper method for checking value existence
This commit is contained in:
parent
9d2bb67834
commit
cbc2de6b85
1 changed files with 1 additions and 1 deletions
|
@ -255,7 +255,7 @@ void handleChangedDefaults(const DefaultPreferencesMode mode)
|
||||||
SettingsStorage *settingsStorage {SettingsStorage::instance()};
|
SettingsStorage *settingsStorage {SettingsStorage::instance()};
|
||||||
for (auto it = changedDefaults.cbegin(); it != changedDefaults.cend(); ++it)
|
for (auto it = changedDefaults.cbegin(); it != changedDefaults.cend(); ++it)
|
||||||
{
|
{
|
||||||
if (settingsStorage->loadValue<QVariant>(it->name).isNull())
|
if (!settingsStorage->hasKey(it->name))
|
||||||
settingsStorage->storeValue(it->name, (mode == DefaultPreferencesMode::Legacy ? it->legacy : it->current));
|
settingsStorage->storeValue(it->name, (mode == DefaultPreferencesMode::Legacy ? it->legacy : it->current));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue