Fix Qt 4.7 compilation.

This commit is contained in:
John Maguire 2012-09-26 12:38:07 +02:00
parent 6dbd0baafc
commit f98f1ff6df
1 changed files with 5 additions and 0 deletions

View File

@ -117,8 +117,13 @@ void LoadTranslation(const QString& prefix, const QString& path,
return;
#endif
#if QT_VERSION >= 0x040800
QString system_language = QLocale::system().uiLanguages().empty() ?
QLocale::system().name() : QLocale::system().uiLanguages()[0];
#else
QString system_language = QLocale::system().name();
#endif
QString language = override_language.isEmpty() ?
system_language : override_language;