Qt can call XInitThreads() if we set the AA_X11InitThreads attribute
authorMohammed Sameer <msameer@foolab.org>
Tue, 11 Sep 2012 20:26:43 +0000 (23:26 +0300)
committerMohammed Sameer <msameer@foolab.org>
Tue, 11 Sep 2012 20:26:43 +0000 (23:26 +0300)
src/main.cpp

index 5cb7d81..62d6ba6 100644 (file)
@@ -4,7 +4,6 @@
 #include <QDeclarativeEngine>
 #include <QtDeclarative>
 #include <QGLWidget>
-#include <X11/Xlib.h>
 
 #include "imports/plugin.h"
 
@@ -13,8 +12,7 @@
 #include "quillitem.h"
 
 Q_DECL_EXPORT int main(int argc, char *argv[]) {
-  XInitThreads();
-
+  QApplication::setAttribute(Qt::AA_X11InitThreads, true);
   QApplication app(argc, argv);
 
   QDeclarativeView view;