diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 7fecdecbc..05efbe114 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -118,10 +118,6 @@ MainWindow::MainWindow(const QDir &home) GCColor *GCColorSet = new GCColor(context); // get/keep colorset GCColorSet->colorSet(); // shut up the compiler - #ifdef Q_OS_MAC - // get an autorelease pool setup - static CocoaInitializer cocoaInitializer; - #endif #ifdef GC_HAVE_WFAPI WFApi *w = WFApi::getInstance(); // ensure created on main thread w->apiVersion();//shutup compiler diff --git a/src/main.cpp b/src/main.cpp index 2a272bf59..f4e0e1569 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -44,6 +44,9 @@ void nostderr(QString dir) } #endif +#ifdef Q_OS_MAC +#include "QtMacSegmentedButton.h" // for cocoa initialiser +#endif #ifdef Q_OS_X11 #include @@ -136,6 +139,11 @@ main(int argc, char *argv[]) // create the application -- only ever ONE regardless of restarts application = new QApplication(argc, argv); +#ifdef Q_OS_MAC + // get an autorelease pool setup + static CocoaInitializer cocoaInitializer; +#endif + // set defaultfont QFont font; font.fromString(appsettings->value(NULL, GC_FONT_DEFAULT, QFont().toString()).toString());