From fe4ebf12696a8e438fa6609552774d1becb14c25 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Mon, 23 Dec 2013 16:24:10 +0100 Subject: [PATCH] fix compile of qt without egl available move the dpy to the place where it is used inside the egl ifdef guard fixes compilation on old distros not having egl Change-Id: I7eebe5305f3a584c0c5da2ea7b9099fdd994249d Reviewed-by: David Faure --- src/plugins/platforms/xcb/qxcbconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 4f42bb1785..24734a8240 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -278,7 +278,6 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra m_xlib_display = dpy; } #else - EGLNativeDisplayType dpy = EGL_DEFAULT_DISPLAY; m_connection = xcb_connect(m_displayName.constData(), &m_primaryScreen); #endif //XCB_USE_XLIB @@ -286,6 +285,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra qFatal("QXcbConnection: Could not connect to display %s", m_displayName.constData()); #ifdef XCB_USE_EGL + EGLNativeDisplayType dpy = EGL_DEFAULT_DISPLAY; EGLDisplay eglDisplay = eglGetDisplay(dpy); m_egl_display = eglDisplay; EGLint major, minor;