mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-20 13:52:44 +01: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