diff options
author | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2016-08-11 11:16:47 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-12 19:03:33 +0000 |
commit | d04982dc84d66bec92b4b3767538676cf925ef17 (patch) | |
tree | 2e6272a9d33c973b4e5463bd5714d2eeade9f2e5 /src/gui/kernel/qpalette.cpp | |
parent | dfa8854cf7e00705e0122cf7022ff1ea4f8e5a74 (diff) | |
download | qtbase-d04982dc84d66bec92b4b3767538676cf925ef17.tar.gz |
QTest::QTouchEventSequence: add a sleep before each touch movement
In any code (such as QtQuick Flickable) which calculates velocity as
distance / time, it's unrealistic to simulate instantaneous touchpoint
movements. So, force a slight delay before each event, so that
the touchpoint can only move very fast, but not infinitely fast.
We use qSleep() rather than qWait() because qWait() has a minimum
qSleep(10), and also processes events. commit() also conditionally
calls processEvents(), and we don't want to make that unconditional.
Change-Id: I3cee890f8951d7ecb8837a6abe216c5a8e0a6e34
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/gui/kernel/qpalette.cpp')
0 files changed, 0 insertions, 0 deletions