diff options
Diffstat (limited to 'examples/opengl')
27 files changed, 79 insertions, 79 deletions
diff --git a/examples/opengl/2dpainting/glwidget.h b/examples/opengl/2dpainting/glwidget.h index 6f0a20022b..16ad1a95f3 100644 --- a/examples/opengl/2dpainting/glwidget.h +++ b/examples/opengl/2dpainting/glwidget.h @@ -67,7 +67,7 @@ public slots: void animate(); protected: - void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *event) override; private: Helper *helper; diff --git a/examples/opengl/2dpainting/widget.h b/examples/opengl/2dpainting/widget.h index a1f36be183..40d20bc0a1 100644 --- a/examples/opengl/2dpainting/widget.h +++ b/examples/opengl/2dpainting/widget.h @@ -67,7 +67,7 @@ public slots: void animate(); protected: - void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *event) override; private: Helper *helper; diff --git a/examples/opengl/contextinfo/renderwindow.h b/examples/opengl/contextinfo/renderwindow.h index 5e9212e04c..c148b71c3c 100644 --- a/examples/opengl/contextinfo/renderwindow.h +++ b/examples/opengl/contextinfo/renderwindow.h @@ -65,7 +65,7 @@ class RenderWindow : public QWindow public: RenderWindow(const QSurfaceFormat &format); QOpenGLContext *context() { return m_context; } - void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE; + void exposeEvent(QExposeEvent *) override; void setForceGLSL110(bool enable) { m_forceGLSL110 = enable; } signals: diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h index 92182e82c2..cd2f8098ad 100644 --- a/examples/opengl/cube/mainwidget.h +++ b/examples/opengl/cube/mainwidget.h @@ -73,13 +73,13 @@ public: ~MainWidget(); protected: - void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE; - void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE; - void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *e) override; + void mouseReleaseEvent(QMouseEvent *e) override; + void timerEvent(QTimerEvent *e) override; - void initializeGL() Q_DECL_OVERRIDE; - void resizeGL(int w, int h) Q_DECL_OVERRIDE; - void paintGL() Q_DECL_OVERRIDE; + void initializeGL() override; + void resizeGL(int w, int h) override; + void paintGL() override; void initShaders(); void initTextures(); diff --git a/examples/opengl/hellogl2/glwidget.h b/examples/opengl/hellogl2/glwidget.h index 9b4a087fd8..cff5633893 100644 --- a/examples/opengl/hellogl2/glwidget.h +++ b/examples/opengl/hellogl2/glwidget.h @@ -68,8 +68,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; public slots: void setXRotation(int angle); @@ -83,11 +83,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: void setupVertexAttribs(); diff --git a/examples/opengl/hellogl2/window.h b/examples/opengl/hellogl2/window.h index 68ee754d8e..5cec60ff06 100644 --- a/examples/opengl/hellogl2/window.h +++ b/examples/opengl/hellogl2/window.h @@ -69,7 +69,7 @@ public: Window(MainWindow *mw); protected: - void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *event) override; private slots: void dockUndock(); diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h index 0229c393f9..1372152e93 100644 --- a/examples/opengl/hellowindow/hellowindow.h +++ b/examples/opengl/hellowindow/hellowindow.h @@ -112,10 +112,10 @@ public: QColor color() const; void updateColor(); - void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE; + void exposeEvent(QExposeEvent *event) override; private: - void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *) override; int m_colorIndex; QColor m_color; diff --git a/examples/opengl/legacy/framebufferobject2/framebufferobject2.pro b/examples/opengl/legacy/framebufferobject2/framebufferobject2.pro index 78fc6b1a63..3f2578bc1f 100644 --- a/examples/opengl/legacy/framebufferobject2/framebufferobject2.pro +++ b/examples/opengl/legacy/framebufferobject2/framebufferobject2.pro @@ -8,4 +8,4 @@ QT += opengl widgets target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/framebufferobject2 INSTALLS += target -contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop") +qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop") 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/grabber/grabber.pro b/examples/opengl/legacy/grabber/grabber.pro index 1db0e23156..88c03f1c5e 100644 --- a/examples/opengl/legacy/grabber/grabber.pro +++ b/examples/opengl/legacy/grabber/grabber.pro @@ -9,4 +9,4 @@ QT += opengl widgets target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/grabber INSTALLS += target -contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop") +qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop") 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/hellogl.pro b/examples/opengl/legacy/hellogl/hellogl.pro index c211242fd2..c6e926c245 100644 --- a/examples/opengl/legacy/hellogl/hellogl.pro +++ b/examples/opengl/legacy/hellogl/hellogl.pro @@ -14,4 +14,4 @@ QT += opengl widgets target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/hellogl INSTALLS += target -contains(QT_CONFIG, opengles.|angle):error("This example requires Qt to be configured with -opengl desktop") +qtConfig(opengles.|angle): error("This example requires Qt to be configured with -opengl desktop") 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/legacy.pro b/examples/opengl/legacy/legacy.pro index 0a74d50f7f..1398332c11 100644 --- a/examples/opengl/legacy/legacy.pro +++ b/examples/opengl/legacy/legacy.pro @@ -2,7 +2,7 @@ requires(qtHaveModule(opengl)) TEMPLATE = subdirs -!contains(QT_CONFIG, dynamicgl): !contains(QT_CONFIG, opengles2) { +!qtConfig(dynamicgl):!qtConfig(opengles2) { # legacy desktop-only examples, no dynamic GL support SUBDIRS = \ grabber \ 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/overpainting/overpainting.pro b/examples/opengl/legacy/overpainting/overpainting.pro index cc46f18889..17213a6079 100644 --- a/examples/opengl/legacy/overpainting/overpainting.pro +++ b/examples/opengl/legacy/overpainting/overpainting.pro @@ -16,4 +16,4 @@ SOURCES = bubble.cpp \ target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/overpainting INSTALLS += target -contains(QT_CONFIG, opengles.|angle):error("This example requires Qt to be configured with -opengl desktop") +qtConfig(opengles.|angle): error("This example requires Qt to be configured with -opengl desktop") 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/pbuffers/pbuffers.pro b/examples/opengl/legacy/pbuffers/pbuffers.pro index d779a2a2dc..7572ba3583 100644 --- a/examples/opengl/legacy/pbuffers/pbuffers.pro +++ b/examples/opengl/legacy/pbuffers/pbuffers.pro @@ -10,4 +10,4 @@ QT += opengl widgets target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/pbuffers INSTALLS += target -contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop") +qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop") diff --git a/examples/opengl/legacy/pbuffers2/pbuffers2.pro b/examples/opengl/legacy/pbuffers2/pbuffers2.pro index 2ba40a6f74..f1baae3931 100644 --- a/examples/opengl/legacy/pbuffers2/pbuffers2.pro +++ b/examples/opengl/legacy/pbuffers2/pbuffers2.pro @@ -8,4 +8,4 @@ RESOURCES += pbuffers2.qrc target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/pbuffers2 INSTALLS += target -contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop") +qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop") 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, diff --git a/examples/opengl/legacy/samplebuffers/samplebuffers.pro b/examples/opengl/legacy/samplebuffers/samplebuffers.pro index 3719f5039d..aca56f8df8 100644 --- a/examples/opengl/legacy/samplebuffers/samplebuffers.pro +++ b/examples/opengl/legacy/samplebuffers/samplebuffers.pro @@ -7,4 +7,4 @@ QT += opengl widgets target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/samplebuffers INSTALLS += target -contains(QT_CONFIG, opengles.|angle|dynamicgl):error("This example requires Qt to be configured with -opengl desktop") +qtConfig(opengles.|angle|dynamicgl): error("This example requires Qt to be configured with -opengl desktop") diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h index 73a4b2e63d..7281451924 100644 --- a/examples/opengl/paintedwindow/paintedwindow.h +++ b/examples/opengl/paintedwindow/paintedwindow.h @@ -84,8 +84,8 @@ private slots: void rotationDone(); private: - void exposeEvent(QExposeEvent *) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; + void exposeEvent(QExposeEvent *) override; + void mousePressEvent(QMouseEvent *) override; void paint(QPainter *painter, const QRect &rect); diff --git a/examples/opengl/qopenglwidget/glwidget.h b/examples/opengl/qopenglwidget/glwidget.h index d677e414f7..de7805a907 100644 --- a/examples/opengl/qopenglwidget/glwidget.h +++ b/examples/opengl/qopenglwidget/glwidget.h @@ -85,9 +85,9 @@ private slots: void handleButtonPress(); protected: - void resizeGL(int w, int h) Q_DECL_OVERRIDE; - void paintGL() Q_DECL_OVERRIDE; - void initializeGL() Q_DECL_OVERRIDE; + void resizeGL(int w, int h) override; + void paintGL() override; + void initializeGL() override; private: void paintTexturedCube(); diff --git a/examples/opengl/qopenglwindow/main.cpp b/examples/opengl/qopenglwindow/main.cpp index 5640acccc7..4287d42d24 100644 --- a/examples/opengl/qopenglwindow/main.cpp +++ b/examples/opengl/qopenglwindow/main.cpp @@ -79,9 +79,9 @@ public: OpenGLWindow(); protected: - void paintGL() Q_DECL_OVERRIDE; - void resizeGL(int w, int h) Q_DECL_OVERRIDE; - void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE; + void paintGL() override; + void resizeGL(int w, int h) override; + void keyPressEvent(QKeyEvent *e) override; private: void setAnimating(bool enabled); diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h index c4c06f3864..0db2695c6a 100644 --- a/examples/opengl/textures/glwidget.h +++ b/examples/opengl/textures/glwidget.h @@ -66,8 +66,8 @@ public: explicit 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; void rotateBy(int xAngle, int yAngle, int zAngle); void setClearColor(const QColor &color); @@ -75,12 +75,12 @@ signals: void clicked(); 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 mouseReleaseEvent(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; + void mouseReleaseEvent(QMouseEvent *event) override; private: void makeObject(); diff --git a/examples/opengl/threadedqopenglwidget/glwidget.h b/examples/opengl/threadedqopenglwidget/glwidget.h index 8d2d8bbc70..c33f7e51a7 100644 --- a/examples/opengl/threadedqopenglwidget/glwidget.h +++ b/examples/opengl/threadedqopenglwidget/glwidget.h @@ -114,7 +114,7 @@ public: ~GLWidget(); protected: - void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE { } + void paintEvent(QPaintEvent *) override { } signals: void renderRequested(); |