diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-10 11:49:43 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-10 11:49:43 (GMT) |
commit | 7e79f0d7eb5285a778b5ec82b4f64b08be99b562 (patch) | |
tree | 3905d7641308fa5e41a13ad2c13e5dab1deb0f66 /src | |
parent | 29f4bc3b609e8dfebb63ff93eecc4ef52da1d70d (diff) | |
parent | 005dc6c7448a724d3df496a1e528199f5a638ce0 (diff) | |
download | Qt-7e79f0d7eb5285a778b5ec82b4f64b08be99b562.zip Qt-7e79f0d7eb5285a778b5ec82b4f64b08be99b562.tar.gz Qt-7e79f0d7eb5285a778b5ec82b4f64b08be99b562.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fixes a crash in gestures.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 98fc10f..2131993 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -693,6 +693,14 @@ void QGraphicsScenePrivate::removeItemHelper(QGraphicsItem *item) --selectionChanging; if (!selectionChanging && selectedItems.size() != oldSelectedItemsSize) emit q->selectionChanged(); + + QHash<QGesture *, QGraphicsObject *>::iterator it; + for (it = gestureTargets.begin(); it != gestureTargets.end();) { + if (it.value() == item) + it = gestureTargets.erase(it); + else + ++it; + } } /*! @@ -5960,7 +5968,8 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) if (gesture->state() == Qt::GestureStarted) startedGestures.insert(gesture); } else { - gesturesPerItem[target].append(gesture); + if (index->items().contains(target)) + gesturesPerItem[target].append(gesture); } } |