From 76cc8ce0437b7047ee984993daab57b2605f52a6 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Wed, 12 Jul 2023 21:05:13 +0300 Subject: [PATCH] renamed setting Signed-off-by: Trial97 --- launcher/Application.cpp | 2 +- launcher/translations/TranslationsModel.cpp | 4 ++-- launcher/ui/widgets/LanguageSelectionWidget.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 86005ef79..5aa9efc4a 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -568,7 +568,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) // Language m_settings->registerSetting("Language", QString()); - m_settings->registerSetting("UseSystemLocales", false); + m_settings->registerSetting("UseSystemLocale", false); // Console m_settings->registerSetting("ShowConsole", false); diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp index e6bc06a64..2763cca26 100644 --- a/launcher/translations/TranslationsModel.cpp +++ b/launcher/translations/TranslationsModel.cpp @@ -530,7 +530,7 @@ Language * TranslationsModel::findLanguage(const QString& key) void TranslationsModel::setUseSystemLocale(bool useSystemLocale) { - APPLICATION->settings()->set("UseSystemLocales", useSystemLocale); + APPLICATION->settings()->set("UseSystemLocale", useSystemLocale); QLocale::setDefault(QLocale(useSystemLocale ? QString::fromStdString(std::locale().name()) : defaultLangCode)); } @@ -566,7 +566,7 @@ bool TranslationsModel::selectLanguage(QString key) * This function is not reentrant. */ QLocale::setDefault( - QLocale(APPLICATION->settings()->get("UseSystemLocales").toBool() ? QString::fromStdString(std::locale().name()) : langCode)); + QLocale(APPLICATION->settings()->get("UseSystemLocale").toBool() ? QString::fromStdString(std::locale().name()) : langCode)); // if it's the default UI language, finish diff --git a/launcher/ui/widgets/LanguageSelectionWidget.cpp b/launcher/ui/widgets/LanguageSelectionWidget.cpp index 8b95999d2..37d053478 100644 --- a/launcher/ui/widgets/LanguageSelectionWidget.cpp +++ b/launcher/ui/widgets/LanguageSelectionWidget.cpp @@ -33,7 +33,7 @@ LanguageSelectionWidget::LanguageSelectionWidget(QWidget* parent) : QWidget(pare formatCheckbox = new QCheckBox(this); formatCheckbox->setObjectName(QStringLiteral("formatCheckbox")); - formatCheckbox->setCheckState(APPLICATION->settings()->get("UseSystemLocales").toBool() ? Qt::Checked : Qt::Unchecked); + formatCheckbox->setCheckState(APPLICATION->settings()->get("UseSystemLocale").toBool() ? Qt::Checked : Qt::Unchecked); connect(formatCheckbox, &QCheckBox::stateChanged, [this]() { APPLICATION->translations()->setUseSystemLocale(formatCheckbox->isChecked()); }); verticalLayout->addWidget(formatCheckbox);