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:
lat9nq 2023-08-02 12:20:19 -04:00
parent 7aa848080d
commit 09e265c116

View File

@ -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("");