Fix double click handler in QQuickItem.
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 9 Mar 2012 10:00:29 +0000 (12:00 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 12 Mar 2012 16:04:24 +0000 (17:04 +0100)
The legacy, desktop-oriented way of calling mousePressed from the
default handlers for mouseDoubleClick is not working properly with
QWindow and QGuiApplication: In Qt 5 a double click will never
suppress any lower level events (like press or release) and therefore
simulating a mouse press in the double click handlers is wrong.

Change-Id: Ic0ad97a5efbcd3deb1717229010dcb84681d7ed4
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
src/quick/items/qquickitem.cpp

index 77808a6..2b3bb55 100644 (file)
@@ -3040,9 +3040,8 @@ void QQuickItem::mouseReleaseEvent(QMouseEvent *event)
     event->ignore();
 }
 
-void QQuickItem::mouseDoubleClickEvent(QMouseEvent *event)
+void QQuickItem::mouseDoubleClickEvent(QMouseEvent *)
 {
-    mousePressEvent(event);
 }
 
 void QQuickItem::mouseUngrabEvent()