Fix compilation on Harmattan
authorSimon Hausmann <simon.hausmann@nokia.com>
Mon, 3 Oct 2011 15:19:07 +0000 (17:19 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 4 Oct 2011 09:21:25 +0000 (11:21 +0200)
Include Xlib.h for XInitThreads and add the SUPPORT_X11 macro
to DEFINES for Harmattan's EGL library.

Change-Id: I34ad284fe5b671f3924e406a18b8c5520df8346a
Reviewed-on: http://codereview.qt-project.org/5935
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/plugins/platforms/xcb/qxcbintegration.cpp
src/plugins/platforms/xcb/xcb.pro

index b0d377b..185765b 100644 (file)
 #include <EGL/egl.h>
 #endif
 
+#ifdef XCB_USE_XLIB
+#include <X11/Xlib.h>
+#endif
+
 #include <private/qplatforminputcontextfactory_qpa_p.h>
 #include <qplatforminputcontext_qpa.h>
 
index 143a671..13fe5b9 100644 (file)
@@ -68,6 +68,10 @@ contains(DEFINES, XCB_USE_DRI2) {
         DEFINES += XCB_USE_EGL
         LIBS += -lEGL
         HEADERS += qxcbeglsurface.h
+
+        # EGL on MeeGo 1.2 Harmattan needs this macro to map EGLNativeDisplayType
+        # and other types to the correct X11 types
+        DEFINES += SUPPORT_X11
     } else:contains(QT_CONFIG, xcb-xlib) {
         DEFINES += XCB_USE_GLX
         HEADERS += qglxintegration.h