summaryrefslogtreecommitdiff
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp8
-rw-r--r--src/widgets/graphicsview/qgraphicstransform_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp1
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.cpp3
5 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h
index 59656f5b0b..36f8aac124 100644
--- a/src/widgets/graphicsview/qgraphicsitem.h
+++ b/src/widgets/graphicsview/qgraphicsitem.h
@@ -1024,14 +1024,14 @@ private:
template <class T> inline T qgraphicsitem_cast(QGraphicsItem *item)
{
- typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type Item;
+ typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Item;
return int(Item::Type) == int(QGraphicsItem::Type)
|| (item && int(Item::Type) == item->type()) ? static_cast<T>(item) : 0;
}
template <class T> inline T qgraphicsitem_cast(const QGraphicsItem *item)
{
- typedef typename QtPrivate::remove_cv<typename QtPrivate::remove_pointer<T>::type>::type Item;
+ typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Item;
return int(Item::Type) == int(QGraphicsItem::Type)
|| (item && int(Item::Type) == item->type()) ? static_cast<T>(item) : 0;
}
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
diff --git a/src/widgets/graphicsview/qgraphicstransform_p.h b/src/widgets/graphicsview/qgraphicstransform_p.h
index 39f7ab5487..38dbd51c2e 100644
--- a/src/widgets/graphicsview/qgraphicstransform_p.h
+++ b/src/widgets/graphicsview/qgraphicstransform_p.h
@@ -77,6 +77,6 @@ public:
QT_END_NAMESPACE
-#endif //QT_NO_GRAPHCISVIEW
+#endif //QT_NO_GRAPHICSVIEW
#endif // QGRAPHICSTRANSFORM_P_H
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index d153915ae6..2adc58e4a4 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -1456,6 +1456,7 @@ bool QGraphicsWidget::event(QEvent *event)
case QEvent::GraphicsSceneMousePress:
if (d->hasDecoration() && windowFrameEvent(event))
return true;
+ break;
case QEvent::GraphicsSceneMouseMove:
case QEvent::GraphicsSceneMouseRelease:
case QEvent::GraphicsSceneMouseDoubleClick:
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.cpp b/src/widgets/graphicsview/qgraphicswidget_p.cpp
index 4beb64a254..46d2a4c1aa 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget_p.cpp
@@ -722,6 +722,9 @@ void QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(QGraphicsSceneHoverEvent
#ifndef QT_NO_CURSOR
if (needsSetCursorCall)
q->setCursor(cursorShape);
+#else
+ Q_UNUSED(needsSetCursorCall);
+ Q_UNUSED(cursorShape);
#endif
// update buttons if we hover over them
windowData->hoveredSubControl = q->style()->hitTestComplexControl(QStyle::CC_TitleBar, &bar, pos.toPoint(), 0);