From 3f921e8f2c1aa57d6f3131532efbbd90b0132245 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 14 Dec 2017 09:24:06 -0800 Subject: [PATCH] Qt: Fix locale being set to English on settings save (fixes #906) --- CHANGES | 1 + src/platform/qt/SettingsView.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index bcb9540f5df..0ef41a44809 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Bugfixes: - GBA Savedata: Fix crash when resizing flash - GB Memory: HDMAs should not start when LCD is off (fixes mgba.io/i/310) - GBA Cheats: Fix slide codes not initializing properly + - Qt: Fix locale being set to English on settings save (fixes mgba.io/i/906) Misc: - GBA: Improve multiboot image detection - GB MBC: Remove erroneous bank 0 wrapping diff --git a/src/platform/qt/SettingsView.cpp b/src/platform/qt/SettingsView.cpp index bc9b7a0d4f1..d089301490b 100644 --- a/src/platform/qt/SettingsView.cpp +++ b/src/platform/qt/SettingsView.cpp @@ -174,7 +174,7 @@ SettingsView::SettingsView(ConfigController* controller, InputController* inputC } QLocale locale(name.remove(QString("%0-").arg(binaryName)).remove(".qm")); m_ui.languages->addItem(locale.nativeLanguageName(), locale); - if (locale == QLocale()) { + if (locale.bcp47Name() == QLocale().bcp47Name()) { m_ui.languages->setCurrentIndex(m_ui.languages->count() - 1); } }