From 93fde87898ac9680cd2c872ecf71b32adba50216 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Zaj=C4=85c?= Date: Fri, 13 May 2011 10:39:34 +0200 Subject: [PATCH] Retain ABI and API compatibility when Qt is built with EGL. Author: Felix Geyer Merge-request: 1230 Reviewed-by: ossi (cherry picked from commit dcbd920daf92d80302633f73dd8324437005a10e) Change-Id: I8d2dc64a2785b4940d06c9493a3ba0f96a487f9b Reviewed-on: http://codereview.qt-project.org/4569 Reviewed-by: Qt Sanity Bot Reviewed-by: Oswald Buddenhagen --- src/opengl/qgl.h | 2 +- src/opengl/qgl_x11egl.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 4d7b6f1..f7685ed 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -407,7 +407,7 @@ protected: #if defined(Q_WS_WIN) virtual int choosePixelFormat(void* pfd, HDC pdc); #endif -#if defined(Q_WS_X11) && defined(QT_NO_EGL) +#if defined(Q_WS_X11) virtual void* tryVisual(const QGLFormat& f, int bufDepth = 1); virtual void* chooseVisual(); #endif diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index a491bef..4dd7fc2 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -257,6 +257,20 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) return true; } +void *QGLContext::chooseVisual() +{ + qFatal("QGLContext::chooseVisual - this method must not be called as Qt is built with EGL support"); + return 0; +} + +void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth) +{ + Q_UNUSED(f); + Q_UNUSED(bufDepth); + qFatal("QGLContext::tryVisual - this method must not be called as Qt is built with EGL support"); + return 0; +} + void QGLWidget::resizeEvent(QResizeEvent *) { Q_D(QGLWidget); -- 2.7.4