diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-05 12:26:22 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-06-05 12:30:02 (GMT) |
commit | 12c315f34ca428c3da38716d2c071a8e94f2acf0 (patch) | |
tree | 8daf15e08c88f31d1738ab9ad7e963523b92ab2b /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | bb587db95d7c20344c0bf06a1f080c0a2e4a9250 (diff) | |
download | Qt-12c315f34ca428c3da38716d2c071a8e94f2acf0.zip Qt-12c315f34ca428c3da38716d2c071a8e94f2acf0.tar.gz Qt-12c315f34ca428c3da38716d2c071a8e94f2acf0.tar.bz2 |
Accept TouchBegin events by default if they are enabled
After an API review round, we agreed that it makes sense for the
TouchBegin event to default to accepted if the widget has subscribed
to receive touch events.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index c0b371f..bf8d83d 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5876,9 +5876,9 @@ bool QGraphicsScenePrivate::sendTouchBeginEvent(QGraphicsItem *origin, QGraphics foreach (QGraphicsItem *item, cachedItemsUnderMouse) { // first, try to deliver the touch event updateTouchPointsForItem(item, touchEvent); - touchEvent->ignore(); - res = item->acceptTouchEvents() - && sendEvent(item, touchEvent); + bool acceptTouchEvents = item->acceptTouchEvents(); + touchEvent->setAccepted(acceptTouchEvents); + res = acceptTouchEvents && sendEvent(item, touchEvent); eventAccepted = touchEvent->isAccepted(); item->d_ptr->acceptedTouchBeginEvent = (res && eventAccepted); touchEvent->spont = false; |