summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/stickman
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2016-11-23 02:02:53 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2016-11-25 22:36:21 +0000
commit011aeb131ed904d948b69d6444ff58cdbfd4990c (patch)
treeae7004ad54843af21f44414574e5af91dde3b908 /examples/widgets/animation/stickman
parentf91bbd243890511c99a084a478e7abe96d334860 (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/stickman')
-rw-r--r--examples/widgets/animation/stickman/graphicsview.h2
-rw-r--r--examples/widgets/animation/stickman/lifecycle.cpp4
-rw-r--r--examples/widgets/animation/stickman/rectbutton.h6
-rw-r--r--examples/widgets/animation/stickman/stickman.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/examples/widgets/animation/stickman/graphicsview.h b/examples/widgets/animation/stickman/graphicsview.h
index 4b9b8fc028..56396bb780 100644
--- a/examples/widgets/animation/stickman/graphicsview.h
+++ b/examples/widgets/animation/stickman/graphicsview.h
@@ -61,7 +61,7 @@ public:
GraphicsView(QWidget *parent = 0);
protected:
- virtual void resizeEvent(QResizeEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
void keyPressEvent(QKeyEvent *) override;
signals:
diff --git a/examples/widgets/animation/stickman/lifecycle.cpp b/examples/widgets/animation/stickman/lifecycle.cpp
index 0ece4f3932..253af22b2d 100644
--- a/examples/widgets/animation/stickman/lifecycle.cpp
+++ b/examples/widgets/animation/stickman/lifecycle.cpp
@@ -70,7 +70,7 @@ public:
setTargetState(target);
}
- virtual bool eventTest(QEvent *e) override
+ bool eventTest(QEvent *e) override
{
if (QSignalTransition::eventTest(e)) {
QVariant key = static_cast<QStateMachine::SignalEvent*>(e)->arguments().at(0);
@@ -95,7 +95,7 @@ public:
startTimer(1000);
}
- virtual bool eventTest(QEvent *e) override
+ bool eventTest(QEvent *e) override
{
return QEventTransition::eventTest(e) && ((qrand() % 50) == 0);
}
diff --git a/examples/widgets/animation/stickman/rectbutton.h b/examples/widgets/animation/stickman/rectbutton.h
index 864a2c179e..ab47bad0f7 100644
--- a/examples/widgets/animation/stickman/rectbutton.h
+++ b/examples/widgets/animation/stickman/rectbutton.h
@@ -60,13 +60,13 @@ public:
RectButton(QString buttonText);
~RectButton();
- virtual QRectF boundingRect() const override;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
protected:
QString m_ButtonText;
- virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
+ void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
signals:
void clicked();
diff --git a/examples/widgets/animation/stickman/stickman.h b/examples/widgets/animation/stickman/stickman.h
index b5fbd14872..f2311a0358 100644
--- a/examples/widgets/animation/stickman/stickman.h
+++ b/examples/widgets/animation/stickman/stickman.h
@@ -69,8 +69,8 @@ public:
StickMan();
~StickMan();
- virtual QRectF boundingRect() const override;
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
+ QRectF boundingRect() const override;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
int nodeCount() const;
Node *node(int idx) const;