diff options
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsscene.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index 0748a7fd9c..c022af6fc0 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -216,6 +216,8 @@ #include <private/qgesturemanager_p.h> #include <private/qpathclipper_p.h> +#include <QtCore/qpointer.h> + // #define GESTURE_DEBUG #ifndef GESTURE_DEBUG # define DEBUG if (0) qDebug @@ -1004,7 +1006,7 @@ void QGraphicsScenePrivate::ungrabMouse(QGraphicsItem *item, bool itemIsDying) void QGraphicsScenePrivate::clearMouseGrabber() { if (!mouseGrabberItems.isEmpty()) - mouseGrabberItems.first()->ungrabMouse(); + mouseGrabberItems.constFirst()->ungrabMouse(); lastMouseGrabberItem = nullptr; } @@ -2884,7 +2886,7 @@ void QGraphicsScene::setFocusItem(QGraphicsItem *item, Qt::FocusReason focusReas /*! Returns \c true if the scene has focus; otherwise returns \c false. If the scene - has focus, it will will forward key events from QKeyEvent to any item that + has focus, it will forward key events from QKeyEvent to any item that has focus. \sa setFocus(), setFocusItem() @@ -3251,6 +3253,7 @@ bool QGraphicsScene::event(QEvent *event) // ### this should only be cleared if we received a new mouse move event, // which relies on us fixing the replay mechanism in QGraphicsView. d->cachedItemsUnderMouse.clear(); + break; default: break; } |