diff options
author | Sergey Starosek <sergey.starosek@gmail.com> | 2013-12-07 17:32:17 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-07 08:09:05 -0800 |
commit | 482214703b01415bb8b64c133f3f82e8d34738be (patch) | |
tree | 3e4110d9a0e0b03bd9f8369c639693d38758a0f3 /qt-ui/models.cpp | |
parent | 4c3f51291e6c212c57df02c49fe4cb352baacc07 (diff) | |
download | subsurface-482214703b01415bb8b64c133f3f82e8d34738be.tar.gz |
Language chooser improvements
Show language instead of country, sort the list.
Show country in brackets to avoid ambiguity for locales like
de_DE and de_CH.
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index d14aae2dd..c83fcb903 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -1772,7 +1772,7 @@ QVariant LanguageModel::data(const QModelIndex& index, int role) const switch(role){ case Qt::DisplayRole:{ QLocale l( currentString.remove("subsurface_")); - return currentString == "English" ? currentString : l.countryToString(l.country()); + return currentString == "English" ? currentString : QString("%1 (%2)").arg(l.languageToString(l.language())).arg(l.countryToString(l.country())); }break; case Qt::UserRole:{ QString currentString = languages.at(index.row()); |