summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/sub-attaq/boat_p.h
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-06-15 10:12:35 +0200
committerhjk <hjk@theqtcompany.com>2016-06-15 09:32:30 +0000
commit40a54bf565079c007eada8755b9ff7224754949d (patch)
treeccd3bb45ca7369b79fc54d26955cf5b0dfc8ece1 /examples/widgets/animation/sub-attaq/boat_p.h
parent4d3ffae3d562e5b3b2748a2d92eb4ab2933422e7 (diff)
Examples: Replace 'Q_DECL_OVERRIDE' by 'override'
Examples should demonstrate best practice, and we can use the keyword directly nowadays. Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'examples/widgets/animation/sub-attaq/boat_p.h')
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h18
1 files changed, 9 insertions, 9 deletions
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());