Fix QtQuickTest::mouseMove not having timestamps
af002b8df9
added timestamps to press and
release events. It did not add the timestamp to move events though. When
using the quick test functionality to send events to flickable, this
leads to great confusion since the move events will be from a completely
different time than the release, in which case flickable responds with
"you waited a long time before releasing, I think you didn't want to
flick". Adding the timestamp also to move events is consistent and makes
tests in qtlocation happy.
Change-Id: I33653c435eff5b62eeaf5a03653d917b7acc4fed
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
This commit is contained in:
parent
f4ac007f4a
commit
291223876b
|
@ -177,6 +177,7 @@ namespace QtQuickTest
|
|||
case MouseMove:
|
||||
// with move event the button is NoButton, but 'buttons' holds the currently pressed buttons
|
||||
me = QMouseEvent(QEvent::MouseMove, pos, window->mapToGlobal(pos), Qt::NoButton, button, stateKey);
|
||||
me.setTimestamp(++lastMouseTimestamp);
|
||||
break;
|
||||
default:
|
||||
QTEST_ASSERT(false);
|
||||
|
|
Loading…
Reference in New Issue