From 40a54bf565079c007eada8755b9ff7224754949d Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 15 Jun 2016 10:12:35 +0200 Subject: Examples: Replace 'Q_DECL_OVERRIDE' by 'override' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniƶ --- examples/widgets/animation/sub-attaq/boat_p.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'examples/widgets/animation/sub-attaq/boat_p.h') diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h index 6d3c3f69f8..5cad6bde96 100644 --- a/examples/widgets/animation/sub-attaq/boat_p.h +++ b/examples/widgets/animation/sub-attaq/boat_p.h @@ -81,7 +81,7 @@ public: { } protected: - virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE + virtual bool eventTest(QEvent *event) override { if (!QKeyEventTransition::eventTest(event)) return false; @@ -100,13 +100,13 @@ public: { } protected: - virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE + virtual bool eventTest(QEvent *event) override { if (!QKeyEventTransition::eventTest(event)) return false; return (boat->currentSpeed() >= 0); } - void onTransition(QEvent *) Q_DECL_OVERRIDE + void onTransition(QEvent *) override { //We decrease the speed if needed if (key == Qt::Key_Left && boat->currentDirection() == Boat::Right) @@ -131,7 +131,7 @@ public: { } protected: - virtual bool eventTest(QEvent *event) Q_DECL_OVERRIDE + virtual bool eventTest(QEvent *event) override { if (!QKeyEventTransition::eventTest(event)) return false; @@ -150,7 +150,7 @@ public: { } protected: - void onEntry(QEvent *) Q_DECL_OVERRIDE + void onEntry(QEvent *) override { boat->setCurrentDirection(Boat::Right); boat->updateBoatMovement(); @@ -167,7 +167,7 @@ public: { } protected: - void onEntry(QEvent *) Q_DECL_OVERRIDE + void onEntry(QEvent *) override { boat->setCurrentDirection(Boat::Left); boat->updateBoatMovement(); @@ -184,7 +184,7 @@ public: { } protected: - void onEntry(QEvent *) Q_DECL_OVERRIDE + void onEntry(QEvent *) override { boat->setCurrentSpeed(0); boat->setCurrentDirection(Boat::None); @@ -202,7 +202,7 @@ public: { } protected: - void onEntry(QEvent *) Q_DECL_OVERRIDE + void onEntry(QEvent *) override { Bomb *b = new Bomb(); b->setPos(boat->x()+boat->size().width(),boat->y()); @@ -223,7 +223,7 @@ public: { } protected: - void onEntry(QEvent *) Q_DECL_OVERRIDE + void onEntry(QEvent *) override { Bomb *b = new Bomb(); b->setPos(boat->x() - b->size().width(), boat->y()); -- cgit v1.2.3