From 11e06c33db53b415036a816fa71f1c912c5a32bf Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Fri, 25 Jan 2013 15:46:23 +0100 Subject: [PATCH] Fix compilation on win/mac --- src/mirall/application.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mirall/application.cpp b/src/mirall/application.cpp index 4edca2112..51c5857ba 100644 --- a/src/mirall/application.cpp +++ b/src/mirall/application.cpp @@ -87,10 +87,12 @@ Application::Application(int &argc, char **argv) : //no need to waste time; if ( _helpOnly ) return; + QString locale = Theme::instance()->enforcedLocale(); + if (locale.isEmpty()) locale = QLocale::system().name(); + QTranslator *qtTranslator = new QTranslator(this); #if defined(Q_OS_MAC) qtTranslator->load(QLatin1String("qt_") + locale, applicationDirPath()+QLatin1String("/../translations") ); // path defaults to app dir. -#endif #elif defined(Q_OS_WIN32) qtTranslator->load(QLatin1String("qt_") + locale, applicationDirPath()); #endif @@ -102,9 +104,6 @@ Application::Application(int &argc, char **argv) : QTranslator *mirallTranslator = new QTranslator(this); - QString locale = Theme::instance()->enforcedLocale(); - if (locale.isEmpty()) locale = QLocale::system().name(); - #ifdef Q_OS_LINUX // FIXME - proper path! mirallTranslator->load(QLatin1String("mirall_") + locale, QLatin1String("/usr/share/mirall/i18n/"));