summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpaintdevice.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-04-12 09:39:24 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-13 08:33:47 +0200
commit5bf5ace38c3e63eb9110c69c74fbf4b66542c02e (patch)
tree46f7cac6f030e41ef631dea08777180a5633db3f /src/opengl/qglpaintdevice.cpp
parentfe0f72fa1a01c41c020afcb95acd503a8dca3a8a (diff)
Prevent warning when using QPainter on a QGLWidget.
Prevents warning "QOpenGLContext::swapBuffers() called without corresponding makeCurrent()". Change-Id: I7e4f94df8654f899c25b3f41cbf4d007ca293f16 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/opengl/qglpaintdevice.cpp')
-rw-r--r--src/opengl/qglpaintdevice.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index 66a97a2ea5..dc77c0fbbb 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -76,8 +76,7 @@ void QGLPaintDevice::beginPaint()
{
// Make sure our context is the current one:
QGLContext *ctx = context();
- if (ctx != QGLContext::currentContext())
- ctx->makeCurrent();
+ ctx->makeCurrent();
// Record the currently bound FBO so we can restore it again
// in endPaint() and bind this device's FBO