Since Qt 6 changed name for Czech Republic.
This commit is contained in:
parent
9f6697ab63
commit
90f184bb95
|
@ -526,7 +526,12 @@ void InitLanguages(QComboBox *combobox)
|
||||||
QLocale loc = QLocale(locale);
|
QLocale loc = QLocale(locale);
|
||||||
QString lang = loc.nativeLanguageName();
|
QString lang = loc.nativeLanguageName();
|
||||||
// Since Qt 5.12 country names have spaces
|
// Since Qt 5.12 country names have spaces
|
||||||
QIcon ico(QString("://flags/%1.png").arg(QLocale::countryToString(loc.country()).remove(' ')));
|
QString country = QLocale::countryToString(loc.country()).remove(' ');
|
||||||
|
if (country == QLatin1String("Czechia"))
|
||||||
|
{
|
||||||
|
country = QLatin1String("CzechRepublic");
|
||||||
|
}
|
||||||
|
QIcon ico(QString("://flags/%1.png").arg(country));
|
||||||
|
|
||||||
combobox->addItem(ico, lang, locale);
|
combobox->addItem(ico, lang, locale);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user