From 66e06ff45496a5af059b6f9855f4ba7927499f6e Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Thu, 1 Jun 2017 22:52:45 +0200 Subject: [PATCH] Use Q_DECLARE_OVERRIDE --- backgroundselector.h | 2 +- board.h | 4 ++-- gamewidget.h | 8 ++++---- mainwindow.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backgroundselector.h b/backgroundselector.h index bbf997e..1c2463f 100644 --- a/backgroundselector.h +++ b/backgroundselector.h @@ -40,7 +40,7 @@ class BackgroundSelector : public QWidget { void useRandomBackgroundPicturesChanged(bool state); void previewBackgroundPicture(); protected: - void changeEvent(QEvent *e); + void changeEvent(QEvent *e) Q_DECL_OVERRIDE; void enableSettings(bool enable=true); private: Ui::KBounceBackgroundSelector *ui; diff --git a/board.h b/board.h index 0a0a439..b387c69 100644 --- a/board.h +++ b/board.h @@ -47,7 +47,7 @@ class KBounceBoard: public QGraphicsObject QPixmap applyWallsOn(QPixmap background) const; void resize( QSize& size ); - void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {} + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE {} void newLevel( int level ); void setPaused( bool ); @@ -62,7 +62,7 @@ class KBounceBoard: public QGraphicsObject void checkCollisions(); QPoint mapPosition( const QPointF& pos ) const; - QRectF boundingRect() const; + QRectF boundingRect() const Q_DECL_OVERRIDE; void setBallVelocity(qreal velocity); void setWallVelocity(qreal velocity); diff --git a/gamewidget.h b/gamewidget.h index a03f464..8ff6867 100644 --- a/gamewidget.h +++ b/gamewidget.h @@ -48,7 +48,7 @@ class KBounceGameWidget : public QGraphicsView KBounceGameWidget::State state() const { return m_state; } KBounceRenderer* renderer() { return &m_renderer; } - QSize minimumSizeHint() const; + QSize minimumSizeHint() const Q_DECL_OVERRIDE; public slots: void closeGame(); @@ -74,9 +74,9 @@ class KBounceGameWidget : public QGraphicsView void tick(); protected: - virtual void resizeEvent( QResizeEvent* event ); - virtual void mouseReleaseEvent( QMouseEvent* event ); - void focusOutEvent(QFocusEvent *event); + void resizeEvent( QResizeEvent* event ) Q_DECL_OVERRIDE; + void mouseReleaseEvent( QMouseEvent* event ) Q_DECL_OVERRIDE; + void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE; void closeLevel(); void newLevel(); void updateCursor(); diff --git a/mainwindow.h b/mainwindow.h index 33e3892..24f0200 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -58,8 +58,8 @@ class KBounceMainWindow : public KXmlGuiWindow void initXMLUI(); void highscore(); - void focusOutEvent( QFocusEvent * ); - void focusInEvent ( QFocusEvent * ); + void focusOutEvent( QFocusEvent * ) Q_DECL_OVERRIDE; + void focusInEvent ( QFocusEvent * ) Q_DECL_OVERRIDE; KBounceGameWidget* m_gameWidget; -- GitLab