summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/gestures
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-05-03 18:27:12 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-06-10 13:07:17 +0000
commit982b70d37db337b2c57a3cfce0f24c3d00a598d6 (patch)
treef86dd50fa2cef003b32b77bbe8eab7cbfac2251e /tests/auto/widgets/gestures
parente73e2264ded27ceb9f3af5b548036d33effa0797 (diff)
autotests: use QTest::createTouchDevice()
Task-number: QTBUG-44030 Change-Id: I514c1294a0ff6587b825982a8bb354104c214120 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/gestures')
-rw-r--r--tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp b/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp
index 6b0c1ecf57..c3ebb838bb 100644
--- a/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp
+++ b/tests/auto/widgets/gestures/qgesturerecognizer/tst_qgesturerecognizer.cpp
@@ -38,8 +38,6 @@
#include <QtCore/QHash>
#include <QtCore/QDebug>
-#include <qpa/qwindowsysteminterface.h>
-
class tst_QGestureRecognizer : public QObject
{
Q_OBJECT
@@ -64,15 +62,13 @@ private:
tst_QGestureRecognizer::tst_QGestureRecognizer()
: m_fingerDistance(qRound(QGuiApplication::primaryScreen()->physicalDotsPerInch() / 2.0))
- , m_touchDevice(new QTouchDevice)
+ , m_touchDevice(QTest::createTouchDevice())
{
qputenv("QT_PAN_TOUCHPOINTS", "2"); // Prevent device detection of pan touch point count.
}
void tst_QGestureRecognizer::initTestCase()
{
- m_touchDevice->setType(QTouchDevice::TouchScreen);
- QWindowSystemInterface::registerTouchDevice(m_touchDevice);
}
#ifndef QT_NO_GESTURES