Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 <kent.hansen@nokia.com>
  • Loading branch information
Laszlo Agocs authored and Qt by Nokia committed Mar 12, 2012
1 parent 406f741 commit cb1ff7a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/quick/items/qquickitem.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit cb1ff7a

Please sign in to comment.