aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest/quicktestevent_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-08-19 10:01:30 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-19 12:50:28 +0000
commit01a9c006b0cb3f9ec7c140d25e6bfa3ca6250a4c (patch)
tree5855832ad2bcfd064808c1f33c10dbcc5f317b73 /src/qmltest/quicktestevent_p.h
parent4a9635b0bfdc6a189375bc48e68b00bd05e15c82 (diff)
TestCase::mouseDrag: set mouse move delay >= 1 ms
Infinite-speed drags do not work well with velocity-sensitive components like Flickable. As with change d04982dc on qtbase, adding a short delay helps to stabilize tests. To keep it flexible, we make QTest::defaultMouseDelay() available via the qtest_events.defaultMouseDelay property. So the delay can be increased by passing a larger delay value to mouseDrag, or by changing the QTEST_MOUSEEVENT_DELAY environment variable (as before). Task-number: QTBUG-55382 Change-Id: I8f8088758a206be104a439ee0d1832eeca574e8c Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'src/qmltest/quicktestevent_p.h')
-rw-r--r--src/qmltest/quicktestevent_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qmltest/quicktestevent_p.h b/src/qmltest/quicktestevent_p.h
index 0cba644cba..0a08347db8 100644
--- a/src/qmltest/quicktestevent_p.h
+++ b/src/qmltest/quicktestevent_p.h
@@ -53,9 +53,11 @@ QT_BEGIN_NAMESPACE
class Q_QUICK_TEST_EXPORT QuickTestEvent : public QObject
{
Q_OBJECT
+ Q_PROPERTY(int defaultMouseDelay READ defaultMouseDelay FINAL)
public:
QuickTestEvent(QObject *parent = 0);
~QuickTestEvent();
+ int defaultMouseDelay() const;
public Q_SLOTS:
bool keyPress(int key, int modifiers, int delay);