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/gui/kernel/qtouchevent | |
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/gui/kernel/qtouchevent')
-rw-r--r-- | tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; |