From c0ceddafa4b5ed98a074e66459f5c59149fb846d Mon Sep 17 00:00:00 2001 From: laserpants Date: Sat, 26 Mar 2016 13:37:26 +0300 Subject: [PATCH] add override compiler macro --- components/slider.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/components/slider.h b/components/slider.h index 28dded0..0d2b978 100644 --- a/components/slider.h +++ b/components/slider.h @@ -14,6 +14,7 @@ public: explicit Handle(Slider *slider); ~Handle(); + Q_DECL_OVERRIDE inline QSize sizeHint() const { return QSize(16, 16); } inline void setRelativePosition(const QPoint &pos) { setPosition(_offset + pos); } @@ -27,9 +28,9 @@ public: void refreshGeometry(); protected: - void paintEvent(QPaintEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *event); + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; private: Slider *const _slider; @@ -50,10 +51,10 @@ public: inline Qt::Orientation orientation() const { return _orientation; } protected: - void paintEvent(QPaintEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *event); - void resizeEvent(QResizeEvent *event); + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; private: inline bool touchesRail(int p, int x) const { return (p >= x-2 && p < x+2); }