diff --git a/ChangeLog.txt b/ChangeLog.txt index ac2913b12..b38e39d7f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -41,6 +41,7 @@ - Fix crash while synchronize measurements. - Fix incorrect filename regular expressions. - Enabling Show Curve Details option causes constant redraw. +- Fix regression with country flags. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index 759f44d5a..0be5f30e4 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -825,7 +825,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); } @@ -833,7 +834,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); }