Use English version of the language on Qt4.7 where nativeLanguageName isn't supported.

This commit is contained in:
Sacha 2013-02-13 15:52:33 +10:00
parent ca23c076a1
commit e16c0dea9b

View File

@ -856,7 +856,11 @@ void MainWindow::createLanguageMenu()
locale.truncate(locale.lastIndexOf('.'));
locale.remove(0, locale.indexOf('_') + 1);
#if QT_VERSION >= 0x040800
QString language = QLocale(locale).nativeLanguageName();
#else
QString language = QLocale::languageToString(QLocale(locale).language());
#endif
QAction *action = new QAction(language, this);
action->setCheckable(true);
action->setData(locale);