mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Preferences: Fixed showing current language twice in list.
This commit is contained in:
parent
11972affaf
commit
edb2e6d624
|
@ -346,7 +346,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
|||
|
||||
//OTHER
|
||||
//Languages
|
||||
QString activeLanguage = "";
|
||||
QString activeLanguage;
|
||||
if (!mApp->currentLanguage().isEmpty()) {
|
||||
activeLanguage = mApp->currentLanguage();
|
||||
QLocale locale(activeLanguage);
|
||||
|
@ -359,12 +359,17 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
|||
QDir lanDir(mApp->TRANSLATIONSDIR);
|
||||
QStringList list = lanDir.entryList(QStringList("*.qm"));
|
||||
foreach(const QString & name, list) {
|
||||
if (name.startsWith("qt_") || name == activeLanguage) {
|
||||
if (name.startsWith("qt_")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QString loc = name;
|
||||
loc.remove(".qm");
|
||||
|
||||
if (loc == activeLanguage) {
|
||||
continue;
|
||||
}
|
||||
|
||||
QLocale locale(loc);
|
||||
QString country = QLocale::countryToString(locale.country());
|
||||
QString language = QLocale::languageToString(locale.language());
|
||||
|
|
Loading…
Reference in New Issue
Block a user