Retain ABI and API compatibility when Qt is built with EGL.
authorMichał Zając <quintasan@kubuntu.org>
Fri, 13 May 2011 08:39:34 +0000 (10:39 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Sep 2011 14:03:47 +0000 (16:03 +0200)
Author: Felix Geyer <debfx-pkg@fobos.de>

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 <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/opengl/qgl.h
src/opengl/qgl_x11egl.cpp

index 4d7b6f1..f7685ed 100644 (file)
@@ -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
index a491bef..4dd7fc2 100644 (file)
@@ -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);