diff options
Diffstat (limited to 'tests/auto/gui')
5 files changed, 22 insertions, 22 deletions
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp index 58dee6f6ca..7200d1cc8a 100644 --- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp +++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp @@ -74,17 +74,17 @@ public: initCount = resizeCount = paintCount = 0; } - void initializeGL() Q_DECL_OVERRIDE { + void initializeGL() override { ++initCount; } - void resizeGL(int w, int h) Q_DECL_OVERRIDE { + void resizeGL(int w, int h) override { ++resizeCount; QCOMPARE(w, size().width()); QCOMPARE(h, size().height()); } - void paintGL() Q_DECL_OVERRIDE { + void paintGL() override { ++paintCount; QOpenGLContext *ctx = QOpenGLContext::currentContext(); @@ -144,7 +144,7 @@ void tst_QOpenGLWindow::basic() class PainterWindow : public QOpenGLWindow { public: - void paintGL() Q_DECL_OVERRIDE { + void paintGL() override { QOpenGLContext *ctx = QOpenGLContext::currentContext(); QVERIFY(ctx); QCOMPARE(ctx, context()); @@ -183,7 +183,7 @@ public: PartialPainterWindow(QOpenGLWindow::UpdateBehavior u) : QOpenGLWindow(u), x(0) { } - void paintGL() Q_DECL_OVERRIDE { + void paintGL() override { ++paintCount; QPainter p(this); @@ -244,7 +244,7 @@ public: Error } m_state; - void paintUnderGL() Q_DECL_OVERRIDE { + void paintUnderGL() override { if (m_state == None || m_state == PaintOver) m_state = PaintUnder; else @@ -255,7 +255,7 @@ public: QCOMPARE(fbo, GLuint(0)); } - void paintGL() Q_DECL_OVERRIDE { + void paintGL() override { if (m_state == PaintUnder) m_state = Paint; else @@ -268,7 +268,7 @@ public: QCOMPARE(fbo, defaultFramebufferObject()); } - void paintOverGL() Q_DECL_OVERRIDE { + void paintOverGL() override { if (m_state == Paint) m_state = PaintOver; else diff --git a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp index 41fcdf9f30..7fb79b28ae 100644 --- a/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp +++ b/tests/auto/gui/kernel/qrasterwindow/tst_qrasterwindow.cpp @@ -54,7 +54,7 @@ class PainterWindow : public QRasterWindow public: void reset() { paintCount = 0; } - void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE { + void paintEvent(QPaintEvent*) override { ++paintCount; QPainter p(this); p.fillRect(QRect(0, 0, 100, 100), Qt::blue); diff --git a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp index ec143896ab..d56b09b75d 100644 --- a/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp +++ b/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp @@ -63,7 +63,7 @@ public: deleteInTouchBegin = deleteInTouchUpdate = deleteInTouchEnd = false; } - bool event(QEvent *event) Q_DECL_OVERRIDE + bool event(QEvent *event) override { switch (event->type()) { case QEvent::TouchBegin: @@ -140,13 +140,13 @@ public: deleteInTouchBegin = deleteInTouchUpdate = deleteInTouchEnd = false; } - QRectF boundingRect() const Q_DECL_OVERRIDE { return QRectF(0, 0, 10, 10); } - void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE + QRectF boundingRect() const override { return QRectF(0, 0, 10, 10); } + void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override { painter->fillRect(QRectF(QPointF(0, 0), boundingRect().size()), Qt::yellow); } - bool sceneEvent(QEvent *event) Q_DECL_OVERRIDE + bool sceneEvent(QEvent *event) override { switch (event->type()) { case QEvent::TouchBegin: @@ -1628,7 +1628,7 @@ class WindowTouchEventFilter : public QObject { Q_OBJECT public: - bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE; + bool eventFilter(QObject *obj, QEvent *event) override; struct TouchInfo { QList<QTouchEvent::TouchPoint> points; QEvent::Type lastSeenType; diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index fc9f50b15c..40f825fa4a 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -352,7 +352,7 @@ private: class ColoredWindow : public QRasterWindow { public: explicit ColoredWindow(const QColor &color, QWindow *parent = 0) : QRasterWindow(parent), m_color(color) {} - void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE + void paintEvent(QPaintEvent *) override { QPainter p(this); p.fillRect(QRect(QPoint(0, 0), size()), m_color); diff --git a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp index f4e3356ad0..9ade3b554e 100644 --- a/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp +++ b/tests/auto/gui/text/qstatictext/tst_qstatictext.cpp @@ -862,19 +862,19 @@ void tst_QStaticText::textDocumentColor() class TestPaintEngine: public QPaintEngine { public: - void drawTextItem(const QPointF &p, const QTextItem &) Q_DECL_OVERRIDE + void drawTextItem(const QPointF &p, const QTextItem &) override { differentVerticalPositions.insert(qRound(p.y())); } - void updateState(const QPaintEngineState &) Q_DECL_OVERRIDE {} + void updateState(const QPaintEngineState &) override {} - void drawPolygon(const QPointF *, int , PolygonDrawMode ) Q_DECL_OVERRIDE {} + void drawPolygon(const QPointF *, int , PolygonDrawMode ) override {} - bool begin(QPaintDevice *) Q_DECL_OVERRIDE { return true; } - bool end() Q_DECL_OVERRIDE { return true; } - void drawPixmap(const QRectF &, const QPixmap &, const QRectF &) Q_DECL_OVERRIDE {} - Type type() const Q_DECL_OVERRIDE + bool begin(QPaintDevice *) override { return true; } + bool end() override { return true; } + void drawPixmap(const QRectF &, const QPixmap &, const QRectF &) override {} + Type type() const override { return User; } |