add QTest::createTouchDevice()
This enables creation of autotests which use touch events, without using private API. Task-number: QTBUG-44030 Change-Id: If8fe89f8423aaafd9e6501e231c33580b9365eb8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>bb10
parent
982b70d37d
commit
04e224b19a
|
|
@ -920,6 +920,17 @@ Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int
|
|||
#endif
|
||||
}
|
||||
|
||||
namespace QTest
|
||||
{
|
||||
Q_GUI_EXPORT QTouchDevice * createTouchDevice(QTouchDevice::DeviceType devType = QTouchDevice::TouchScreen)
|
||||
{
|
||||
QTouchDevice *ret = new QTouchDevice();
|
||||
ret->setType(devType);
|
||||
QWindowSystemInterface::registerTouchDevice(ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, QTouchDevice *device,
|
||||
const QList<QTouchEvent::TouchPoint> &points,
|
||||
Qt::KeyboardModifiers mods = Qt::NoModifier)
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, QTouchDevice *device,
|
|||
|
||||
namespace QTest
|
||||
{
|
||||
Q_GUI_EXPORT QTouchDevice * createTouchDevice(QTouchDevice::DeviceType devType = QTouchDevice::TouchScreen);
|
||||
|
||||
class QTouchEventSequence
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue