diff options
author | hjk <hjk@theqtcompany.com> | 2016-06-15 10:12:35 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-06-15 09:32:30 +0000 |
commit | 40a54bf565079c007eada8755b9ff7224754949d (patch) | |
tree | ccd3bb45ca7369b79fc54d26955cf5b0dfc8ece1 /examples/opengl/legacy | |
parent | 4d3ffae3d562e5b3b2748a2d92eb4ab2933422e7 (diff) |
Examples: Replace 'Q_DECL_OVERRIDE' by 'override'
Examples should demonstrate best practice, and we can use the keyword
directly nowadays.
Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4
Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'examples/opengl/legacy')
-rw-r--r-- | examples/opengl/legacy/framebufferobject2/glwidget.h | 12 | ||||
-rw-r--r-- | examples/opengl/legacy/grabber/glwidget.h | 10 | ||||
-rw-r--r-- | examples/opengl/legacy/hellogl/glwidget.h | 14 | ||||
-rw-r--r-- | examples/opengl/legacy/hellogl/window.h | 2 | ||||
-rw-r--r-- | examples/opengl/legacy/overpainting/glwidget.h | 14 | ||||
-rw-r--r-- | examples/opengl/legacy/pbuffers/glwidget.h | 10 | ||||
-rw-r--r-- | examples/opengl/legacy/samplebuffers/glwidget.h | 8 |
7 files changed, 35 insertions, 35 deletions
diff --git a/examples/opengl/legacy/framebufferobject2/glwidget.h b/examples/opengl/legacy/framebufferobject2/glwidget.h index 8f46f65b29..d3e4aa5af5 100644 --- a/examples/opengl/legacy/framebufferobject2/glwidget.h +++ b/examples/opengl/legacy/framebufferobject2/glwidget.h @@ -55,12 +55,12 @@ class GLWidget : public QGLWidget public: GLWidget(QWidget *parent); ~GLWidget(); - void initializeGL() Q_DECL_OVERRIDE; - void resizeGL(int w, int h) Q_DECL_OVERRIDE; - void paintGL() Q_DECL_OVERRIDE; - void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE { update(); } - void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE { killTimer(timerId); } - void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE { timerId = startTimer(20); } + void initializeGL() override; + void resizeGL(int w, int h) override; + void paintGL() override; + void timerEvent(QTimerEvent *) override { update(); } + void mousePressEvent(QMouseEvent *) override { killTimer(timerId); } + void mouseReleaseEvent(QMouseEvent *) override { timerId = startTimer(20); } void drawCube(int i, GLfloat z, GLfloat ri, GLfloat jmp, GLfloat amp); diff --git a/examples/opengl/legacy/grabber/glwidget.h b/examples/opengl/legacy/grabber/glwidget.h index 3a6e2fb3bb..67020b0ada 100644 --- a/examples/opengl/legacy/grabber/glwidget.h +++ b/examples/opengl/legacy/grabber/glwidget.h @@ -76,11 +76,11 @@ signals: void zRotationChanged(int angle); protected: - void initializeGL() Q_DECL_OVERRIDE; - void paintGL() Q_DECL_OVERRIDE; - void resizeGL(int width, int height) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void initializeGL() override; + void paintGL() override; + void resizeGL(int width, int height) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; private slots: void advanceGears(); diff --git a/examples/opengl/legacy/hellogl/glwidget.h b/examples/opengl/legacy/hellogl/glwidget.h index 89446d5937..8154d7405c 100644 --- a/examples/opengl/legacy/hellogl/glwidget.h +++ b/examples/opengl/legacy/hellogl/glwidget.h @@ -65,8 +65,8 @@ public: GLWidget(QWidget *parent = 0); ~GLWidget(); - QSize minimumSizeHint() const Q_DECL_OVERRIDE; - QSize sizeHint() const Q_DECL_OVERRIDE; + QSize minimumSizeHint() const override; + QSize sizeHint() const override; //! [0] //! [1] @@ -83,11 +83,11 @@ signals: //! [2] protected: - void initializeGL() Q_DECL_OVERRIDE; - void paintGL() Q_DECL_OVERRIDE; - void resizeGL(int width, int height) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void initializeGL() override; + void paintGL() override; + void resizeGL(int width, int height) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; //! [2] //! [3] diff --git a/examples/opengl/legacy/hellogl/window.h b/examples/opengl/legacy/hellogl/window.h index 8d684a155b..04e83694a4 100644 --- a/examples/opengl/legacy/hellogl/window.h +++ b/examples/opengl/legacy/hellogl/window.h @@ -67,7 +67,7 @@ public: Window(); protected: - void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *event) override; private: QSlider *createSlider(); diff --git a/examples/opengl/legacy/overpainting/glwidget.h b/examples/opengl/legacy/overpainting/glwidget.h index ffa7922061..e5ea539f6d 100644 --- a/examples/opengl/legacy/overpainting/glwidget.h +++ b/examples/opengl/legacy/overpainting/glwidget.h @@ -68,7 +68,7 @@ public: ~GLWidget(); //! [0] - QSize sizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; int xRotation() const { return xRot; } int yRotation() const { return yRot; } int zRotation() const { return zRot; } @@ -80,12 +80,12 @@ public slots: //! [1] protected: - void initializeGL() Q_DECL_OVERRIDE; - void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; - void resizeGL(int width, int height) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; - void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; - void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; + void initializeGL() override; + void paintEvent(QPaintEvent *event) override; + void resizeGL(int width, int height) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void showEvent(QShowEvent *event) override; private slots: void animate(); diff --git a/examples/opengl/legacy/pbuffers/glwidget.h b/examples/opengl/legacy/pbuffers/glwidget.h index d447abb638..397329c428 100644 --- a/examples/opengl/legacy/pbuffers/glwidget.h +++ b/examples/opengl/legacy/pbuffers/glwidget.h @@ -67,11 +67,11 @@ public: ~GLWidget(); protected: - void initializeGL() Q_DECL_OVERRIDE; - void paintGL() Q_DECL_OVERRIDE; - void resizeGL(int width, int height) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE { setAnimationPaused(true); } - void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE { setAnimationPaused(false); } + void initializeGL() override; + void paintGL() override; + void resizeGL(int width, int height) override; + void mousePressEvent(QMouseEvent *) override { setAnimationPaused(true); } + void mouseReleaseEvent(QMouseEvent *) override { setAnimationPaused(false); } private: void initializeGeometry(); diff --git a/examples/opengl/legacy/samplebuffers/glwidget.h b/examples/opengl/legacy/samplebuffers/glwidget.h index f46f8e19ac..f02f0835ef 100644 --- a/examples/opengl/legacy/samplebuffers/glwidget.h +++ b/examples/opengl/legacy/samplebuffers/glwidget.h @@ -56,10 +56,10 @@ public: GLWidget(QWidget *parent); protected: - void initializeGL() Q_DECL_OVERRIDE; - void resizeGL(int w, int h) Q_DECL_OVERRIDE; - void paintGL() Q_DECL_OVERRIDE; - void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE; + void initializeGL() override; + void resizeGL(int w, int h) override; + void paintGL() override; + void timerEvent(QTimerEvent *) override; void makeObject(); void quad(GLenum primitive, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2, |