summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-11-07 13:15:31 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-08 07:21:29 +0100
commit59be0509e087a5d4a8884a56e14a2ddbf5735ac4 (patch)
treefdec4a48d650abf2c0bdc93c91556fa16ad6d93d /src/plugins
parent24d1f584146c487c1bc16a8191c2c472da6c6f2b (diff)
iOS: Detect/handle cancellation of subset of touch points
Change-Id: I0d345d07fe62a8c7844333bf1eed9be6d6fa432f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 2cb3fe86e1..70f4cc4267 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -226,10 +226,16 @@
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
{
- Q_UNUSED(touches) // ### can a subset of the active touches be cancelled?
+ if (!touches) {
+ m_activeTouches.clear();
+ } else {
+ for (UITouch *touch in touches)
+ m_activeTouches.remove(touch);
+
+ Q_ASSERT_X(m_activeTouches.isEmpty(), Q_FUNC_INFO,
+ "Subset of active touches cancelled by UIKit");
+ }
- // Clear current touch points
- m_activeTouches.clear();
m_nextTouchId = 0;
// Send cancel touch event synchronously