tst_qquickwindow: make use of new QTest::createTouchDevice function
So gui-private API isn't necessary anymore.
Same as change 94324bd93f
Task-number: QTBUG-44030
Change-Id: I780cc1eedf9285336b96219a1fb1cd4016512701
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
a25f0ed5d2
commit
cfe4e8b8dc
|
@ -7,7 +7,7 @@ include(../shared/util.pri)
|
||||||
|
|
||||||
macx:CONFIG -= app_bundle
|
macx:CONFIG -= app_bundle
|
||||||
|
|
||||||
QT += core-private gui-private qml-private quick-private testlib
|
QT += core-private qml-private quick-private testlib
|
||||||
|
|
||||||
TESTDATA = data/*
|
TESTDATA = data/*
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "../shared/visualtestutil.h"
|
#include "../shared/visualtestutil.h"
|
||||||
#include "../shared/viewtestutil.h"
|
#include "../shared/viewtestutil.h"
|
||||||
#include <QSignalSpy>
|
#include <QSignalSpy>
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
|
||||||
#include <private/qquickwindow_p.h>
|
#include <private/qquickwindow_p.h>
|
||||||
#include <private/qguiapplication_p.h>
|
#include <private/qguiapplication_p.h>
|
||||||
#include <QRunnable>
|
#include <QRunnable>
|
||||||
|
@ -275,22 +274,14 @@ class tst_qquickwindow : public QQmlDataTest
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
tst_qquickwindow()
|
tst_qquickwindow()
|
||||||
|
: touchDevice(QTest::createTouchDevice())
|
||||||
|
, touchDeviceWithVelocity(QTest::createTouchDevice())
|
||||||
{
|
{
|
||||||
QQuickWindow::setDefaultAlphaBuffer(true);
|
QQuickWindow::setDefaultAlphaBuffer(true);
|
||||||
|
touchDeviceWithVelocity->setCapabilities(QTouchDevice::Position | QTouchDevice::Velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void initTestCase()
|
|
||||||
{
|
|
||||||
QQmlDataTest::initTestCase();
|
|
||||||
touchDevice = new QTouchDevice;
|
|
||||||
touchDevice->setType(QTouchDevice::TouchScreen);
|
|
||||||
QWindowSystemInterface::registerTouchDevice(touchDevice);
|
|
||||||
touchDeviceWithVelocity = new QTouchDevice;
|
|
||||||
touchDeviceWithVelocity->setType(QTouchDevice::TouchScreen);
|
|
||||||
touchDeviceWithVelocity->setCapabilities(QTouchDevice::Position | QTouchDevice::Velocity);
|
|
||||||
QWindowSystemInterface::registerTouchDevice(touchDeviceWithVelocity);
|
|
||||||
}
|
|
||||||
void cleanup();
|
void cleanup();
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
void openglContextCreatedSignal();
|
void openglContextCreatedSignal();
|
||||||
|
|
Loading…
Reference in New Issue