aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/drawer/tst_drawer.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-04-24 10:09:00 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-04-24 08:53:25 +0000
commitce87c5be886d4c24045f7bdbaaf93fda3eed366f (patch)
treec2f668c101226727119078f96d62a3c836ffd000 /tests/auto/drawer/tst_drawer.cpp
parent1691662e66e5651c2995a07f9159a4395fe67373 (diff)
tst_Drawer: disable compression for touch events
Touch event compression makes auto tests unpredictable and is causing headache for the upcoming "smooth dragging" changes. Disable touch event compression and remove the manual flushing that is no longer needed. Change-Id: I1264203255d1c796829479026c84ba368f4758b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/drawer/tst_drawer.cpp')
-rw-r--r--tests/auto/drawer/tst_drawer.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/auto/drawer/tst_drawer.cpp b/tests/auto/drawer/tst_drawer.cpp
index 251f5567..02e15257 100644
--- a/tests/auto/drawer/tst_drawer.cpp
+++ b/tests/auto/drawer/tst_drawer.cpp
@@ -58,6 +58,8 @@ class tst_Drawer : public QQmlDataTest
Q_OBJECT
private slots:
+ void initTestCase();
+
void visible_data();
void visible();
@@ -89,6 +91,13 @@ private slots:
void interactive();
};
+
+void tst_Drawer::initTestCase()
+{
+ QQmlDataTest::initTestCase();
+ qputenv("QML_NO_TOUCH_COMPRESSION", "1");
+}
+
void tst_Drawer::visible_data()
{
QTest::addColumn<QString>("source");
@@ -755,10 +764,8 @@ void tst_Drawer::touch()
// drag to close
QTest::touchEvent(window, device.data()).press(0, QPoint(300, 100));
QTest::touchEvent(window, device.data()).move(0, QPoint(300 - drawer->dragMargin(), 100));
- for (int x = 300; x > 100; x -= 10) {
+ for (int x = 300; x > 100; x -= 10)
QTest::touchEvent(window, device.data()).move(0, QPoint(x, 100));
- QQuickWindowPrivate::get(window)->flushFrameSynchronousEvents();
- }
QTest::touchEvent(window, device.data()).move(0, QPoint(100, 100));
QTRY_COMPARE(drawer->position(), 0.5);
QTest::touchEvent(window, device.data()).release(0, QPoint(100, 100));