From: Laszlo Agocs Date: Wed, 9 May 2012 06:44:59 +0000 (+0300) Subject: Do not send double click when neither mouse nor touch was accepted X-Git-Tag: upstream/5.2.1~1915 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f99f873ea1c21991e9ca508f33ec48424946864;p=platform%2Fupstream%2Fqtdeclarative.git Do not send double click when neither mouse nor touch was accepted The original fix in change Ief4de360203e55e56f83179075e050f717a12108 worked fine for mouse-based components. However when mixing with components that handle touch too, the event->isAccepted() condition gets problematic: It might be true because the touch was accepted, it does not guarantee the mouse press was accepted. Change-Id: I00bfff2bd700da84f8cc12cf36430ed381ea320b Reviewed-by: Martin Jones --- diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index da870fd..6de38da 100644 --- a/src/quick/items/qquickcanvas.cpp +++ b/src/quick/items/qquickcanvas.cpp @@ -411,7 +411,7 @@ void QQuickCanvasPrivate::translateTouchToMouse(QTouchEvent *event) event->setAccepted(true); else touchMouseId = -1; - if (doubleClick && event->isAccepted()) { + if (doubleClick && me.isAccepted()) { touchMousePressTimestamp = 0; QQuickMouseEventEx me = touchToMouseEvent(QEvent::MouseButtonDblClick, p); me.setTimestamp(event->timestamp());