Destroy the FBO in QQuickWidget while a context is current
authorLaszlo Agocs <laszlo.agocs@digia.com>
Mon, 2 Jun 2014 08:21:56 +0000 (10:21 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 3 Jun 2014 08:34:35 +0000 (10:34 +0200)
commita9019adc013b711df6a9e2831b08306ea5591f31
tree9dd4a299f8cb839575223e960a7da412d026f5fc
parent31f0e3aa00f80ba4a0f4a06cf2ca4121b86f41b7
Destroy the FBO in QQuickWidget while a context is current

When creating the new FBO, it will try to restore the previous FBO
after initialization. The internal tracking of the current FBO goes
horribly wrong when a QOpenGLFramebufferObject is destroyed with
no context current. In 5.4 the problem is solved by removing the
tracking altogether. Here QQuickWidget is fixed to play nice and
destroy QOpenGLFramebufferObject always with the context current.

Task-number: QTBUG-39389
Change-Id: Ic6917696ed61f284d661a578c9c7f2e0673c412d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
src/quickwidgets/qquickwidget.cpp