From: Laszlo Agocs Date: Fri, 9 Mar 2012 10:00:29 +0000 (+0200) Subject: Fix double click handler in QQuickItem. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=cb1ff7a8e5db8925afbca5cb00826deb87818cd7;p=konrad%2Fqtdeclarative.git Fix double click handler in QQuickItem. 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 --- diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 77808a6..2b3bb55 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -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()