summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-08-31 13:58:48 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-31 21:33:01 +0000
commitd3375534ac3d459cc27a01b2510cc34a64162d11 (patch)
tree7cd1ae6f74c4d3ed12d82e380975530a03630144 /src
parent9010a4351fc9a95b98833993ccf6a460d2fa25f9 (diff)
Restore signature of qt_handleTouchEvent()
The function return value changed in commit e1f25b1c8. Anyhow, this breaks the AUT probe of Squish on Windows, as long as it is built against an older Qt version. Squish can of course be adjusted eventually, but let's allow some grace period. Fixes: SQUISH-15324 Change-Id: I289ed43bffcf292aa2eae3962a4661ed5c29100e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 4a29ee770f76e72fe71275d5f987fc9de9af12a0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qtestsupport_gui.cpp2
-rw-r--r--src/gui/kernel/qtestsupport_gui.h6
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp8
-rw-r--r--src/widgets/kernel/qtestsupport_widgets.cpp4
4 files changed, 15 insertions, 5 deletions
diff --git a/src/gui/kernel/qtestsupport_gui.cpp b/src/gui/kernel/qtestsupport_gui.cpp
index 0a461a6396..c796e0f8a3 100644
--- a/src/gui/kernel/qtestsupport_gui.cpp
+++ b/src/gui/kernel/qtestsupport_gui.cpp
@@ -99,7 +99,7 @@ bool QTouchEventSequence::commit(bool processEvents)
QThread::msleep(1);
bool ret = false;
if (targetWindow)
- ret = qt_handleTouchEvent(targetWindow, device, points.values());
+ ret = qt_handleTouchEventv2(targetWindow, device, points.values());
if (processEvents)
QCoreApplication::processEvents();
previousPoints = points;
diff --git a/src/gui/kernel/qtestsupport_gui.h b/src/gui/kernel/qtestsupport_gui.h
index 1bf81f1888..e93fd52018 100644
--- a/src/gui/kernel/qtestsupport_gui.h
+++ b/src/gui/kernel/qtestsupport_gui.h
@@ -12,7 +12,11 @@ QT_BEGIN_NAMESPACE
class QWindow;
-Q_GUI_EXPORT bool qt_handleTouchEvent(QWindow *w, const QPointingDevice *device,
+Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *w, const QPointingDevice *device,
+ const QList<QEventPoint> &points,
+ Qt::KeyboardModifiers mods = Qt::NoModifier);
+
+Q_GUI_EXPORT bool qt_handleTouchEventv2(QWindow *w, const QPointingDevice *device,
const QList<QEventPoint> &points,
Qt::KeyboardModifiers mods = Qt::NoModifier);
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 3831d202f3..07879b36bf 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -1203,7 +1203,7 @@ namespace QTest
}
}
-Q_GUI_EXPORT bool qt_handleTouchEvent(QWindow *window, const QPointingDevice *device,
+Q_GUI_EXPORT bool qt_handleTouchEventv2(QWindow *window, const QPointingDevice *device,
const QList<QEventPoint> &points,
Qt::KeyboardModifiers mods = Qt::NoModifier)
{
@@ -1211,5 +1211,11 @@ Q_GUI_EXPORT bool qt_handleTouchEvent(QWindow *window, const QPointingDevice *de
QWindowSystemInterfacePrivate::toNativeTouchPoints(points, window), mods);
}
+Q_GUI_EXPORT void qt_handleTouchEvent(QWindow *window, const QPointingDevice *device,
+ const QList<QEventPoint> &points,
+ Qt::KeyboardModifiers mods = Qt::NoModifier)
+{
+ qt_handleTouchEventv2(window, device, points, mods);
+}
QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qtestsupport_widgets.cpp b/src/widgets/kernel/qtestsupport_widgets.cpp
index ea8317db03..ff57def8ee 100644
--- a/src/widgets/kernel/qtestsupport_widgets.cpp
+++ b/src/widgets/kernel/qtestsupport_widgets.cpp
@@ -122,9 +122,9 @@ bool QTouchEventWidgetSequence::commit(bool processEvents)
return ret;
QThread::msleep(1);
if (targetWindow) {
- ret = qt_handleTouchEvent(targetWindow, device, points.values());
+ ret = qt_handleTouchEventv2(targetWindow, device, points.values());
} else if (targetWidget) {
- ret = qt_handleTouchEvent(targetWidget->windowHandle(), device, points.values());
+ ret = qt_handleTouchEventv2(targetWidget->windowHandle(), device, points.values());
}
if (processEvents)
QCoreApplication::processEvents();