summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index a8b136d..39f04d4 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -76,7 +76,6 @@
#endif
#ifdef Q_WS_QWS
-#include <private/qglpaintdevice_qws_p.h>
#include <private/qglwindowsurface_qws_p.h>
#endif
@@ -4743,16 +4742,19 @@ Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_2_engine)
Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_engine)
#endif
-#ifdef Q_WS_QWS
Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine()
{
-#if !defined(QT_OPENGL_ES_2)
+#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
return qt_gl_engine();
+#elif defined(QT_OPENGL_ES_2)
+ return qt_gl_2_engine();
#else
- return 0; // XXX
+ if (qt_gl_preferGL2Engine())
+ return qt_gl_2_engine();
+ else
+ return qt_gl_engine();
#endif
}
-#endif
/*!
\internal
@@ -4762,16 +4764,7 @@ Q_OPENGL_EXPORT QPaintEngine* qt_qgl_paint_engine()
*/
QPaintEngine *QGLWidget::paintEngine() const
{
-#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
- return qt_gl_engine();
-#elif defined(QT_OPENGL_ES_2)
- return qt_gl_2_engine();
-#else
- if (qt_gl_preferGL2Engine())
- return qt_gl_2_engine();
- else
- return qt_gl_engine();
-#endif
+ return qt_qgl_paint_engine();
}
#ifdef QT3_SUPPORT