From 09c1181a56f1827ab08eeddca3fc97ccd8d860e9 Mon Sep 17 00:00:00 2001 From: lotodore Date: Thu, 8 Jul 2010 17:04:17 +0000 Subject: [PATCH] Fixing a lot of Mac issues with the current Qt release. --- src/pokerth.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pokerth.cpp b/src/pokerth.cpp index b400e047..2c40a1d7 100755 --- a/src/pokerth.cpp +++ b/src/pokerth.cpp @@ -91,6 +91,14 @@ int main( int argc, char **argv ) return 0; } +#ifdef __APPLE__ + // The following needs to be done directly after the application is created. + QDir dir(QApplication::applicationDirPath()); + dir.cdUp(); + dir.cd("plugins"); + QApplication::setLibraryPaths(QStringList(dir.absolutePath())); +#endif + //create defaultconfig ConfigFile *myConfig = new ConfigFile(argv[0], false); @@ -132,14 +140,6 @@ int main( int argc, char **argv ) QTranslator translator; translator.load(QString(myAppDataPath +"translations/pokerth_") + QString::fromStdString(myConfig->readConfigString("Language"))); a.installTranslator(&translator); - - -#ifdef __APPLE__ - QDir dir(QApplication::applicationDirPath()); - dir.cdUp(); - dir.cd("plugins"); - QApplication::setLibraryPaths(QStringList(dir.absolutePath())); -#endif qRegisterMetaType("unsigned"); qRegisterMetaType >("boost::shared_ptr");