Make QGLWidget::paintGL() call glClear().

Creating and displaying a plain QGLWidget on Mac would
display "garbage" or previous frame buffer content
on screen. This looks broken and raises interesting 
privacy concerns.

Fix by adding a call to glClear().

Change-Id: I507c24275e41fac0be5f518c5a70d151099ae6b8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Morten Johan Sorvig 2012-10-23 11:31:48 +02:00 committed by The Qt Project
parent efc9b77a6e
commit 9830ba007a

View File

@ -3854,6 +3854,7 @@ void QGLWidget::initializeGL()
void QGLWidget::paintGL()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}