diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-04-23 10:03:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-23 18:57:45 +0200 |
commit | 1f6ab6a661a468dc6b5fb2dc24b05148e052c858 (patch) | |
tree | 077325f94b3a14f68632bb376408d6c34f777061 /src/gui/kernel/qopenglcontext.cpp | |
parent | 146658a10f290603470b800d71b778239e764312 (diff) |
Fixed QGLWidget not being able to be made current with a context.
If the QGLWidget's creation is triggered by a sibling or similar being
created it would end up without the surface type OpenGLSurface. We need
to make sure the QWindow has the correct surface type to prevent
QOpenGLContext::makeCurrent() from failing.
Task-number: QTBUG-30811
Change-Id: Ifc85f9120d89bd0bed4a3911233799830cb3a0f3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/kernel/qopenglcontext.cpp')
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 483baf0f09..c93752c3d7 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -759,7 +759,7 @@ bool QOpenGLContext::makeCurrent(QSurface *surface) return false; if (surface->surfaceType() != QSurface::OpenGLSurface) { - qWarning() << "QOpenGLContext::makeCurrent() called with non-opengl surface"; + qWarning() << "QOpenGLContext::makeCurrent() called with non-opengl surface" << surface; return false; } |