From b59e605b4d2f3c17b8bee0322ba156f990403d2d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 5 May 2015 09:36:31 +0200 Subject: QQuickWindow: Replace assert() on unreleased touch points by warning. Output a warning message and clear QQuickWindowPrivate::itemForTouchPointId should unreleased touch points exist when QEvent::TouchEnd is received. Task-number: QTBUG-45856 Change-Id: I8a05220e4258c0ca401f79a2c32ec4f1d43fa444 Reviewed-by: Laszlo Agocs --- src/quick/items/qquickwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/quick') diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index bccebb1a14..0b1c79567f 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1989,7 +1989,12 @@ void QQuickWindowPrivate::reallyDeliverTouchEvent(QTouchEvent *event) } if (event->type() == QEvent::TouchEnd) { - Q_ASSERT(itemForTouchPointId.isEmpty()); + if (!itemForTouchPointId.isEmpty()) { + qWarning() << "No release received for" << itemForTouchPointId.size() + << "touch points over" << itemForTouchPointId.begin().value() + << "on touch end."; + itemForTouchPointId.clear(); + } } --touchRecursionGuard; -- cgit v1.2.3