Always call XInitThreads.
authorGunnar Sletta <gunnar.sletta@nokia.com>
Thu, 19 May 2011 06:34:52 +0000 (08:34 +0200)
committerGunnar Sletta <gunnar.sletta@nokia.com>
Thu, 19 May 2011 06:34:52 +0000 (08:34 +0200)
Any Qt application that embeds a QSGView needs to call this
because of the threaded renderer. Today applications that
use threaded GL silently fail. In a few weeks time, the
refactor branch will be merged, which will obsolete this
change, so it is a temporary measure to get tests and
examples running.

src/gui/kernel/qapplication_x11.cpp

index 20542ea..d1f9eb1 100644 (file)
@@ -1740,8 +1740,8 @@ void qt_init(QApplicationPrivate *priv, int,
     } else {
         // Qt controls everything (default)
 
-        if (QApplication::testAttribute(Qt::AA_X11InitThreads))
-            XInitThreads();
+        // With the threaded QML renderer, we always need this.
+        XInitThreads();
 
         // Set application name and class
         char *app_class = 0;