summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/moveblocks/main.cpp
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/moveblocks/main.cpp
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/moveblocks/main.cpp')
-rw-r--r--examples/widgets/animation/moveblocks/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/widgets/animation/moveblocks/main.cpp b/examples/widgets/animation/moveblocks/main.cpp
index f85211ef88..a9b95808a5 100644
--- a/examples/widgets/animation/moveblocks/main.cpp
+++ b/examples/widgets/animation/moveblocks/main.cpp
@@ -98,14 +98,14 @@ public:
protected:
//![14]
- virtual bool eventTest(QEvent *event) override
+ bool eventTest(QEvent *event) override
{
return (event->type() == QEvent::Type(StateSwitchEvent::StateSwitchType))
&& (static_cast<StateSwitchEvent *>(event)->rand() == m_rand);
}
//![14]
- virtual void onTransition(QEvent *) override {}
+ void onTransition(QEvent *) override {}
private:
int m_rand;
@@ -122,7 +122,7 @@ public:
//![10]
//![11]
- virtual void onEntry(QEvent *) override
+ void onEntry(QEvent *) override
{
int n;
while ((n = (qrand() % m_stateCount + 1)) == m_lastIndex)
@@ -130,7 +130,7 @@ public:
m_lastIndex = n;
machine()->postEvent(new StateSwitchEvent(n));
}
- virtual void onExit(QEvent *) override {}
+ void onExit(QEvent *) override {}
//![11]
//![12]
@@ -174,7 +174,7 @@ public:
}
protected:
- virtual void resizeEvent(QResizeEvent *event) override
+ void resizeEvent(QResizeEvent *event) override
{
fitInView(scene()->sceneRect());
QGraphicsView::resizeEvent(event);