From 055b8e2d3fdd324e58de102528a4fba7baf3ed29 Mon Sep 17 00:00:00 2001 From: Jakob Leben Date: Sun, 9 Oct 2011 18:43:11 +0200 Subject: [PATCH] qtcollider: call XInitThreads() before creating QApplication Keyboard and mouse ugens call it, which forces us to call it before them (i.e. before QApplication is created), or using Qt would crash after internal server is booted. --- QtCollider/interface.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/QtCollider/interface.cpp b/QtCollider/interface.cpp index 13fbf819c..4c4a5eca3 100644 --- a/QtCollider/interface.cpp +++ b/QtCollider/interface.cpp @@ -28,15 +28,22 @@ #include #include +#ifdef Q_WS_X11 +# include +#endif + #include QC_PUBLIC void QtCollider::init() { if( !QApplication::instance() ) { qcDebugMsg( 1, "Initializing QtCollider" ); - #ifdef Q_OS_MAC - QApplication::setAttribute( Qt::AA_MacPluginApplication, true ); - #endif +#ifdef Q_WS_X11 + XInitThreads(); +#endif +#ifdef Q_OS_MAC + QApplication::setAttribute( Qt::AA_MacPluginApplication, true ); +#endif static int qcArgc = 1; static char qcArg0[] = ""; static char *qcArgv[1]; -- 2.11.4.GIT