diff options
author | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2016-09-29 23:23:25 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-10-04 12:24:17 +0000 |
commit | a65d9b7acf62fdafd670b40c01425cedff61106c (patch) | |
tree | ac1216905091a046daab265a536063217335ec29 | |
parent | 4be48cf9ee320f779e3e37db34865faac86fcc17 (diff) | |
download | qtlocation-a65d9b7acf62fdafd670b40c01425cedff61106c.tar.gz |
Remove a bunch of ungrabTouch/Mouse calls
Ungrabbing means actively not wanting to receive any future events.
With slight changes in the event delivery in Qt 5.8, this leads to
release events not being delivered to the items, which in turn means
that the map thinks it's pressed after the last touch is gone.
There is no reason to call ungrab at all, when an event ends in a
regular way (release/cancel). The only reason to ungrab is when for some
reason future move/release events are unwanted, in which case the item
needs to make sure it's in the right state (as in not expecting release
events to follow).
Task-number: QTBUG-56213
Change-Id: Ieb8dbf4d8ab312cff461c4fe8a3621af67a132b9
Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | src/imports/location/qdeclarativegeomap.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp index 83130b95..e311d77f 100644 --- a/src/imports/location/qdeclarativegeomap.cpp +++ b/src/imports/location/qdeclarativegeomap.cpp @@ -393,7 +393,6 @@ void QDeclarativeGeoMap::mouseReleaseEvent(QMouseEvent *event) { if (isInteractive()) { m_gestureArea->handleMouseReleaseEvent(event); - ungrabMouse(); } else { QQuickItem::mouseReleaseEvent(event); } @@ -1112,10 +1111,6 @@ void QDeclarativeGeoMap::touchEvent(QTouchEvent *event) { if (isInteractive()) { m_gestureArea->handleTouchEvent(event); - if ( event->type() == QEvent::TouchEnd || - event->type() == QEvent::TouchCancel) { - ungrabTouchPoints(); - } } else { //ignore event so sythesized event is generated; QQuickItem::touchEvent(event); @@ -1486,11 +1481,6 @@ bool QDeclarativeGeoMap::sendMouseEvent(QMouseEvent *event) } } - if (event->type() == QEvent::MouseButtonRelease) { - if (win && win->mouseGrabberItem() == this) - ungrabMouse(); - } - return false; } @@ -1538,11 +1528,6 @@ bool QDeclarativeGeoMap::sendTouchEvent(QTouchEvent *event) } } - if (event->type() == QEvent::TouchEnd) { - if (touchPointGrabberItem(point) == this) { - ungrabTouchPoints(); - } - } return false; } |