Fix compilation on win/mac

This commit is contained in:
Daniel Molkentin 2013-01-25 15:46:23 +01:00
parent c0f2f5bcaa
commit 11e06c33db

View file

@ -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/"));