diff --git a/ChangeLog.txt b/ChangeLog.txt index 6e240a2fe..1a9f6e1af 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,6 @@ # Version 0.7.45 (unreleased) - Fix incorrect seam allowance for angle type second edge right angle. +- Fix regression with country flags. # Version 0.7.44 Feb 9, 2021 - Placeholder %size% has incorrect value. diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index 19e4e4641..5ad4789a9 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -623,7 +623,8 @@ void InitLanguages(QComboBox *combobox) QLocale loc = QLocale(locale); QString lang = loc.nativeLanguageName(); - QIcon ico(QString("%1/%2.png").arg("://flags", QLocale::countryToString(loc.country()))); + // Since Qt 5.12 country names have spaces + QIcon ico(QString("://flags/%1.png").arg(QLocale::countryToString(loc.country()).remove(' '))); combobox->addItem(ico, lang, locale); } @@ -631,7 +632,8 @@ void InitLanguages(QComboBox *combobox) if (combobox->count() == 0 || not englishUS) { // English language is internal and doens't have own *.qm file. - QIcon ico(QString("%1/%2.png").arg("://flags", QLocale::countryToString(QLocale::UnitedStates))); + // Since Qt 5.12 country names have spaces + QIcon ico(QString("://flags/%1.png").arg(QLocale::countryToString(QLocale::UnitedStates).remove(' '))); QString lang = QLocale(en_US).nativeLanguageName(); combobox->addItem(ico, lang, en_US); }