diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-11-23 02:02:53 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-11-25 22:36:21 +0000 |
commit | 011aeb131ed904d948b69d6444ff58cdbfd4990c (patch) | |
tree | ae7004ad54843af21f44414574e5af91dde3b908 /examples/widgets/animation/sub-attaq | |
parent | f91bbd243890511c99a084a478e7abe96d334860 (diff) |
Examples: Remove a redundant virtual specifier for overriders
It's a good practice to use override without virtual:
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override
Change-Id: I5c2d73600e6c706424589c0487133c03a4ef3629
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/widgets/animation/sub-attaq')
-rw-r--r-- | examples/widgets/animation/sub-attaq/boat.h | 2 | ||||
-rw-r--r-- | examples/widgets/animation/sub-attaq/boat_p.h | 6 | ||||
-rw-r--r-- | examples/widgets/animation/sub-attaq/states.h | 6 | ||||
-rw-r--r-- | examples/widgets/animation/sub-attaq/submarine.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/examples/widgets/animation/sub-attaq/boat.h b/examples/widgets/animation/sub-attaq/boat.h index 24b004a108..a75e2b1474 100644 --- a/examples/widgets/animation/sub-attaq/boat.h +++ b/examples/widgets/animation/sub-attaq/boat.h @@ -86,7 +86,7 @@ public: void updateBoatMovement(); - virtual int type() const override; + int type() const override; signals: void boatDestroyed(); diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h index 5cad6bde96..de11ff9555 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) override + bool eventTest(QEvent *event) override { if (!QKeyEventTransition::eventTest(event)) return false; @@ -100,7 +100,7 @@ public: { } protected: - virtual bool eventTest(QEvent *event) override + bool eventTest(QEvent *event) override { if (!QKeyEventTransition::eventTest(event)) return false; @@ -131,7 +131,7 @@ public: { } protected: - virtual bool eventTest(QEvent *event) override + bool eventTest(QEvent *event) override { if (!QKeyEventTransition::eventTest(event)) return false; diff --git a/examples/widgets/animation/sub-attaq/states.h b/examples/widgets/animation/sub-attaq/states.h index 1d50abbf02..cd68e319c2 100644 --- a/examples/widgets/animation/sub-attaq/states.h +++ b/examples/widgets/animation/sub-attaq/states.h @@ -152,7 +152,7 @@ class UpdateScoreTransition : public QSignalTransition public: UpdateScoreTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target); protected: - virtual bool eventTest(QEvent *event) override; + bool eventTest(QEvent *event) override; private: PlayState * game; GraphicsScene *scene; @@ -164,7 +164,7 @@ class WinTransition : public QSignalTransition public: WinTransition(GraphicsScene *scene, PlayState *game, QAbstractState *target); protected: - virtual bool eventTest(QEvent *event) override; + bool eventTest(QEvent *event) override; private: PlayState * game; GraphicsScene *scene; @@ -176,7 +176,7 @@ private: public: CustomSpaceTransition(QWidget *widget, PlayState *game, QEvent::Type type, int key); protected: - virtual bool eventTest(QEvent *event) override; + bool eventTest(QEvent *event) override; private: PlayState *game; }; diff --git a/examples/widgets/animation/sub-attaq/submarine.h b/examples/widgets/animation/sub-attaq/submarine.h index abfdca6195..d145c9cbee 100644 --- a/examples/widgets/animation/sub-attaq/submarine.h +++ b/examples/widgets/animation/sub-attaq/submarine.h @@ -81,7 +81,7 @@ public: void launchTorpedo(int speed); void destroy(); - virtual int type() const override; + int type() const override; QGraphicsRotation *rotation() const { return graphicsRotation; } |