summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2013-12-23 16:24:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-30 12:24:08 +0100
commitfe4ebf12696a8e438fa6609552774d1becb14c25 (patch)
tree87f144c2ca1151e90b62ada1f5610fd49437c3d7 /src/plugins
parentecf11d62fc6f57cccf6f3326e768b1c7cabbd0b3 (diff)
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 <david.faure@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp2
1 files changed, 1 insertions, 1 deletions
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;