mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-25 10:52:48 -06:00
config(qt): Use qt_config directly to read config
ReadSetting with the default is a convenience function reading settings, not for use in an internal environment. It tries to manage the default value of a setting.
This commit is contained in:
parent
7aa848080d
commit
09e265c116
1 changed files with 4 additions and 2 deletions
|
@ -1271,9 +1271,11 @@ void Config::ReadSettingGeneric(Settings::BasicSetting* const setting) {
|
|||
}
|
||||
|
||||
if (global || !use_global) {
|
||||
const bool is_default = ReadSetting(name + QStringLiteral("/default"), true).value<bool>();
|
||||
const bool is_default =
|
||||
qt_config->value(name + QStringLiteral("/default"), true).value<bool>();
|
||||
if (!is_default) {
|
||||
setting->LoadString(ReadSetting(name, default_value).value<QString>().toStdString());
|
||||
setting->LoadString(
|
||||
qt_config->value(name, default_value).value<QString>().toStdString());
|
||||
} else {
|
||||
// Empty string resets the Setting to default
|
||||
setting->LoadString("");
|
||||
|
|
Loading…
Reference in a new issue