From e16c0dea9be9949dc55b8df6a783066db6799076 Mon Sep 17 00:00:00 2001 From: Sacha Date: Wed, 13 Feb 2013 15:52:33 +1000 Subject: [PATCH] Use English version of the language on Qt4.7 where nativeLanguageName isn't supported. --- Qt/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 1c412dcd60..baae95e7f4 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -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);