mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03: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()};
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue