summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication_p.h
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens.qnx@kdab.com>2012-07-17 17:18:25 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-24 10:46:24 +0200
commit7808ec795c5831d56dae9c4f9f7e1306489864aa (patch)
tree1e1aaf184be8e83423ac168704818cc811aa687c /src/widgets/kernel/qapplication_p.h
parent349f16b03cb75c5284022f957c122446ebfc0b79 (diff)
Propagate synthesized mouse events in parallel (lock-step) with touch
This patch implement the equivalent of 468626e99a90d6ac21cb311cde05c658ccb3b781 in qtdeclarative but for QtWidgets. If a widget doesn't accept a touch event, then QApplication gives it another try by synthesizing a corresponding mouse event. This way QtQuick and QtWidget behave in a similar way, removing the need for platform backends to try to emulate a mouse event from a touch event unconditionally. Also add relevant unit tests and adjust old QApplication ones. Change-Id: Iddbf6d756c4b52931a9d1c314b50d7a31dbcdee9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/kernel/qapplication_p.h')
-rw-r--r--src/widgets/kernel/qapplication_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 463cccb4f9..e53896f82c 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -290,6 +290,7 @@ public:
QWidget *findClosestTouchPointTarget(QTouchDevice *device, const QPointF &screenPos);
void appendTouchPoint(const QTouchEvent::TouchPoint &touchPoint);
void removeTouchPoint(int touchPointId);
+ bool translateTouchToMouse(QWidget *widget, QTouchEvent *event);
static void translateRawTouchEvent(QWidget *widget,
QTouchDevice *device,
const QList<QTouchEvent::TouchPoint> &touchPoints,