aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2016-11-10 10:58:21 +0100
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2016-11-11 12:27:35 +0000
commit291223876bb190ca4b5a07cf8f605c7bf88d7ab6 (patch)
treed9dfb4bfd06399cad977710f1df818959d725ab2 /src
parentf4ac007f4a19bc095ff15d415a6629986de78e49 (diff)
Fix QtQuickTest::mouseMove not having timestamps
af002b8df9b084fd7f26e9eead9844aab36bdc4d 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>
Diffstat (limited to 'src')
-rw-r--r--src/qmltest/quicktestevent.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp
index b26d463445..230bc4eca9 100644
--- a/src/qmltest/quicktestevent.cpp
+++ b/src/qmltest/quicktestevent.cpp
@@ -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);