summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-16 12:26:36 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-11-16 13:54:01 +0000
commitb39adf8945616dfc02df7177dccef6b051a1903b (patch)
tree21a91178abc484b8cf191eec461f80678a107b33 /src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
parent38e935701c0faeb19b9b1493dc2d6d60c6bc3ca3 (diff)
parent90c425642dfeae4564b43dacf15f80479962e910 (diff)
Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
index b884e93290..203cc8007c 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
@@ -694,8 +694,7 @@ void QGraphicsSceneBspTreeIndex::itemChange(const QGraphicsItem *item, QGraphics
bool QGraphicsSceneBspTreeIndex::event(QEvent *event)
{
Q_D(QGraphicsSceneBspTreeIndex);
- switch (event->type()) {
- case QEvent::Timer:
+ if (event->type() == QEvent::Timer) {
if (d->indexTimerId && static_cast<QTimerEvent *>(event)->timerId() == d->indexTimerId) {
if (d->restartIndexTimer) {
d->restartIndexTimer = false;
@@ -704,11 +703,8 @@ bool QGraphicsSceneBspTreeIndex::event(QEvent *event)
d->_q_updateIndex();
}
}
- // Fallthrough intended - support timers in subclasses.
- default:
- return QObject::event(event);
}
- return true;
+ return QObject::event(event);
}
QT_END_NAMESPACE