Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.2, 5.7.1, 5.8.0
-
None
-
qtbase: 8325808dcf0cc9061f05ec89b6c3e3afb8c1ab8f qtdeclarative: af002b8df9b084fd7f26e9eead9844aab36bdc4d 291223876bb190ca4b5a07cf8f605c7bf88d7ab6
Description
QGuiApplicationPrivate::processMouseEvent() (http://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/kernel/qguiapplication.cpp#n1890) sets timestamp:
QMouseEvent ev(type, localPoint, localPoint, globalPoint, button, buttons, e->modifiers, e->source); ev.setTimestamp(e->timestamp);
QTest::mouseEvent does not: http://code.qt.io/cgit/qt/qtbase.git/tree/src/testlib/qtestmouse.h#n196
Neither QtQuickTest::mouseEvent do:
http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/qmltest/quicktestevent.cpp#n167
Due to this the timestamp() method of a QMouseEvent generated by a QTest::mouseClick() always returns 0.
In Qt WebEngine we use timestamp() function to recognize non-single clicks (double, triple, whatever clicks):
http://code.qt.io/cgit/qt/qtwebengine.git/tree/src/core/render_widget_host_view_qt.cpp?h=5.8#n921
Currently two subsequent mouseClick() call is detected as a double click no matter how long waiting between two clicks. Due to this we can't test/simulate clicking without workarounds (eg. https://codereview.qt-project.org/#/c/172158/).
Attachments
Issue Links
- relates to
-
QTBUG-55831 [REG: 5.5->5.6]: When doing a QTest::mouseRelease() on a window that has a Flickable in it then it will flick right to the end
-
- Closed
-