QOpenGLWidget/Window: improve docs for the dtor

Remove a typo and add the standard sentence about a dtor.

Change-Id: Ie21ad6d2e83977705ea43fdc872d08f496a32376
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
bb10
Giuseppe D'Angelo 2015-02-07 15:08:10 +01:00
parent 9aabc62312
commit 773e33af43
2 changed files with 4 additions and 2 deletions

View File

@ -345,7 +345,7 @@ QOpenGLWindow::QOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior update
resources belonging to the context provided by this window.
\warning if you have objects wrapping OpenGL resources (such as
QOpenGLBuffer, QOpenGLShaderProgram, etc.), as members of a QOpenGLWindow
QOpenGLBuffer, QOpenGLShaderProgram, etc.) as members of a QOpenGLWindow
subclass, you may need to add a call to makeCurrent() in that subclass'
destructor as well. Due to the rules of C++ object destruction, those objects
will be destroyed \e{before} calling this function (but after that the

View File

@ -862,12 +862,14 @@ QOpenGLWidget::QOpenGLWidget(QWidget *parent, Qt::WindowFlags f)
}
/*!
Destroys the QOpenGLWidget instance, freeing its resources.
The QOpenGLWidget's context is made current in the destructor, allowing for
safe destruction of any child object that may need to release OpenGL
resources belonging to the context provided by this widget.
\warning if you have objects wrapping OpenGL resources (such as
QOpenGLBuffer, QOpenGLShaderProgram, etc.), as members of a OpenGLWidget
QOpenGLBuffer, QOpenGLShaderProgram, etc.) as members of a OpenGLWidget
subclass, you may need to add a call to makeCurrent() in that subclass'
destructor as well. Due to the rules of C++ object destruction, those objects
will be destroyed \e{before} calling this function (but after that the