From 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Mon, 18 Sep 2017 10:36:49 +0200 Subject: 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 Reviewed-by: Ville Voutilainen Reviewed-by: Olivier Goffart (Woboq GmbH) --- tests/manual/touch/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/manual/touch') diff --git a/tests/manual/touch/main.cpp b/tests/manual/touch/main.cpp index 1d00ea5db5..9d4b8d08bd 100644 --- a/tests/manual/touch/main.cpp +++ b/tests/manual/touch/main.cpp @@ -118,7 +118,7 @@ public: explicit PanGesture(const QWidget *w, const QPanGesture *source) : Gesture(w, source) , m_offset(source->offset()) {} - void draw(const QRectF &rect, QPainter &painter) const Q_DECL_OVERRIDE + void draw(const QRectF &rect, QPainter &painter) const override { const QPointF hotSpot = drawHotSpot(rect, painter); painter.drawLine(hotSpot, hotSpot + m_offset); @@ -134,7 +134,7 @@ public: , m_horizontal(source->horizontalDirection()), m_vertical(source->verticalDirection()) , m_angle(source->swipeAngle()) {} - void draw(const QRectF &rect, QPainter &painter) const Q_DECL_OVERRIDE; + void draw(const QRectF &rect, QPainter &painter) const override; private: QSwipeGesture::SwipeDirection m_horizontal; @@ -197,7 +197,7 @@ class EventFilter : public QObject { public: explicit EventFilter(const EventTypeVector &types, QObject *p) : QObject(p), m_types(types) {} - bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE; + bool eventFilter(QObject *, QEvent *) override; signals: void eventReceived(const QString &); @@ -292,8 +292,8 @@ signals: void logMessage(const QString &); protected: - bool event(QEvent *event) Q_DECL_OVERRIDE; - void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE; + bool event(QEvent *event) override; + void paintEvent(QPaintEvent *) override; private: void handleGestureEvent(QGestureEvent *gestureEvent); -- cgit v1.2.3