diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-05-09 09:44:59 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-10 09:10:55 +0200 |
commit | 1f99f873ea1c21991e9ca508f33ec48424946864 (patch) | |
tree | 2e5a98713659eb9644d2d75282f4abe73fd8cc97 /src/quick/items/qquickcanvas.cpp | |
parent | 527b700f73c3bc114ba092418ee48626e95014a3 (diff) |
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 <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquickcanvas.cpp')
-rw-r--r-- | src/quick/items/qquickcanvas.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickcanvas.cpp b/src/quick/items/qquickcanvas.cpp index da870fd448..6de38da3e7 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()); |