diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2017-09-18 10:36:49 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2017-09-19 11:53:42 +0000 |
commit | 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (patch) | |
tree | 330914ff8225867e19b9ed5e049813d9f1e5ec08 /tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp | |
parent | 93dd85141b35460a83dac86083581ba1c1975927 (diff) |
Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in:
src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
doc/global/qt-cpp-defines.qdocconf
(definition and documentation of Q_DECL_OVERRIDE)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp index e10c7591d5..7bb0de7e17 100644 --- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp +++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp @@ -100,16 +100,16 @@ public: m_w(expectedWidth), m_h(expectedHeight), r(1.0f), g(0.0f), b(0.0f) { } - void initializeGL() Q_DECL_OVERRIDE { + void initializeGL() override { m_initCalled = true; initializeOpenGLFunctions(); } - void paintGL() Q_DECL_OVERRIDE { + void paintGL() override { m_paintCalled = true; glClearColor(r, g, b, 1.0f); glClear(GL_COLOR_BUFFER_BIT); } - void resizeGL(int w, int h) Q_DECL_OVERRIDE { + void resizeGL(int w, int h) override { m_resizeCalled = true; m_resizeOk = w == m_w && h == m_h; } @@ -203,10 +203,10 @@ public: PainterWidget(QWidget *parent) : QOpenGLWidget(parent), m_clear(false) { } - void initializeGL() Q_DECL_OVERRIDE { + void initializeGL() override { initializeOpenGLFunctions(); } - void paintGL() Q_DECL_OVERRIDE { + void paintGL() override { QPainter p(this); QCOMPARE(p.device()->width(), width()); QCOMPARE(p.device()->height(), height()); @@ -322,7 +322,7 @@ public: void resetPaintCount() { m_count = 0; } protected: - void drawForeground(QPainter *, const QRectF &) Q_DECL_OVERRIDE; + void drawForeground(QPainter *, const QRectF &) override; int m_count; }; @@ -372,7 +372,7 @@ class PaintCountWidget : public QOpenGLWidget public: PaintCountWidget() : m_count(0) { } void reset() { m_count = 0; } - void paintGL() Q_DECL_OVERRIDE { ++m_count; } + void paintGL() override { ++m_count; } int m_count; }; @@ -393,7 +393,7 @@ void tst_QOpenGLWidget::requestUpdate() class FboCheckWidget : public QOpenGLWidget { public: - void paintGL() Q_DECL_OVERRIDE { + void paintGL() override { GLuint reportedDefaultFbo = QOpenGLContext::currentContext()->defaultFramebufferObject(); GLuint expectedDefaultFbo = defaultFramebufferObject(); QCOMPARE(reportedDefaultFbo, expectedDefaultFbo); |