summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-08-31 13:58:48 +0200
committerKai Köhne <kai.koehne@qt.io>2022-08-31 22:58:24 +0200
commit4a29ee770f76e72fe71275d5f987fc9de9af12a0 (patch)
treeb0744bbf254f1b8a2068f1a207b0cf2fda1db012
parent0d3f09ac0231fca114aa58553144b78f8040a2e1 (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. Pick-to: 6.4 Fixes: SQUISH-15324 Change-Id: I289ed43bffcf292aa2eae3962a4661ed5c29100e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-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();