diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /examples/widgets/animation/sub-attaq/boat_p.h | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'examples/widgets/animation/sub-attaq/boat_p.h')
-rw-r--r-- | examples/widgets/animation/sub-attaq/boat_p.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h index de11ff9555..8ebfeb27f5 100644 --- a/examples/widgets/animation/sub-attaq/boat_p.h +++ b/examples/widgets/animation/sub-attaq/boat_p.h @@ -146,7 +146,8 @@ private: class MoveStateRight : public QState { public: - explicit MoveStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat) + explicit MoveStateRight(Boat *boat, QState *parent = nullptr) + : QState(parent), boat(boat) { } protected: @@ -163,7 +164,8 @@ private: class MoveStateLeft : public QState { public: - explicit MoveStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat) + explicit MoveStateLeft(Boat *boat, QState *parent = nullptr) + : QState(parent), boat(boat) { } protected: @@ -180,7 +182,8 @@ private: class StopState : public QState { public: - explicit StopState(Boat *boat,QState *parent = 0) : QState(parent), boat(boat) + explicit StopState(Boat *boat, QState *parent = nullptr) + : QState(parent), boat(boat) { } protected: @@ -198,13 +201,14 @@ private: class LaunchStateRight : public QState { public: - explicit LaunchStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat) + explicit LaunchStateRight(Boat *boat, QState *parent = nullptr) + : QState(parent), boat(boat) { } protected: void onEntry(QEvent *) override { - Bomb *b = new Bomb(); + Bomb *b = new Bomb; b->setPos(boat->x()+boat->size().width(),boat->y()); GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene()); scene->addItem(b); @@ -219,13 +223,14 @@ private: class LaunchStateLeft : public QState { public: - explicit LaunchStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat) + explicit LaunchStateLeft(Boat *boat, QState *parent = nullptr) + : QState(parent), boat(boat) { } protected: void onEntry(QEvent *) override { - Bomb *b = new Bomb(); + Bomb *b = new Bomb; b->setPos(boat->x() - b->size().width(), boat->y()); GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene()); scene->addItem(b); |