summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/preferences
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-09-20 12:42:59 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-09-20 12:48:30 -0700
commit67a226c00a78ca4f3c63e5818a9306e6f7257d10 (patch)
treec3aef55ca5daca6397ec2c8a477e80a6429d5394 /desktop-widgets/preferences
parent6b181d6b8579b8281257a0d3cdeaff4769c96477 (diff)
downloadsubsurface-67a226c00a78ca4f3c63e5818a9306e6f7257d10.tar.gz
Language preference: search for the locale instead of the language string
And make sure that you use the language / country delimiter that we use in the file system Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/preferences')
-rw-r--r--desktop-widgets/preferences/preferences_language.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp
index 64e937aef..7484bbe96 100644
--- a/desktop-widgets/preferences/preferences_language.cpp
+++ b/desktop-widgets/preferences/preferences_language.cpp
@@ -37,7 +37,7 @@ void PreferencesLanguage::refreshSettings()
ui->dateFormatEntry->setText(prefs.date_format);
ui->shortDateFormatEntry->setText(prefs.date_format_short);
QAbstractItemModel *m = ui->languageDropdown->model();
- QModelIndexList languages = m->match(m->index(0, 0), Qt::UserRole, prefs.locale.language);
+ QModelIndexList languages = m->match(m->index(0, 0), Qt::UserRole, QString(prefs.locale.lang_locale).replace("-", "_"));
if (languages.count())
ui->languageDropdown->setCurrentIndex(languages.first().row());
}