summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2016-12-08 00:23:14 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2018-08-16 11:00:31 +0000
commit242ea38375534f529f155efa46593e2a42577455 (patch)
tree066840072a102161115a30d398cf67da7ddbee61 /src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp
parent9b59a2ef973a067fb0c4a43396d1aca329b24f9c (diff)
doc: Add missing override and remove redundant virtual for snippets
Change-Id: I2395fd01b93c4ea364225e0cf1a5f59908b691d0 Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp')
-rw-r--r--src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp b/src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp
index 4a3816ae72..633a413b4f 100644
--- a/src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp
+++ b/src/widgets/doc/snippets/code/doc_gui_widgets_qopenglwidget.cpp
@@ -55,7 +55,7 @@ public:
MyGLWidget(QWidget *parent) : QOpenGLWidget(parent) { }
protected:
- void initializeGL()
+ void initializeGL() override
{
// Set up the rendering context, load shaders and other resources, etc.:
QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
@@ -63,7 +63,7 @@ protected:
...
}
- void resizeGL(int w, int h)
+ void resizeGL(int w, int h) override
{
// Update projection matrix and other size related settings:
m_projection.setToIdentity();
@@ -71,7 +71,7 @@ protected:
...
}
- void paintGL()
+ void paintGL() override
{
// Draw the scene:
QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
@@ -86,7 +86,7 @@ protected:
class MyGLWidget : public QOpenGLWidget, protected QOpenGLFunctions
{
...
- void initializeGL()
+ void initializeGL() override
{
initializeOpenGLFunctions();
glClearColor(...);
@@ -108,7 +108,7 @@ widget->setFormat(format); // must be called before the widget or its parent win
//! [3]
...
- void paintGL()
+ void paintGL() override
{
QOpenGLFunctions_3_2_Core *f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_3_2_Core>();
...