diff --git a/src/xbus/main.cpp b/src/xbus/main.cpp index 12a85bf79..7a7ecf0c0 100644 --- a/src/xbus/main.cpp +++ b/src/xbus/main.cpp @@ -16,7 +16,17 @@ #define XPLM_MSG_LIVERY_LOADED 108 #endif -QSharedPointer g_qApp; +// Change QSharedPointer to QSharedPointer below +// in case you want to have Qt Gui components inside a X-Plane plugin. The current +// default was used since QApplication causes an infinite loop in X-Plane on OSX +// platforms. X-Plane is allocating an NSApplication but never calling run(), rather +// it controls the main loop itself and pumps the event Q as needed. This causes +// unusual start conditions for QCocoaEventDispatcher and ends up in the infinite +// loop. Since QCoreApplication is not using QCocoaEventDispatcher it works fine +// and is used as a workaround. +// See https://dev.vatsim-germany.org/issues/293 for more information. + +QSharedPointer g_qApp; XBus::CPlugin *g_plugin; PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc)