aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickdrawer.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-04-20 16:28:59 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-04-21 07:52:32 +0000
commit7f06ac49129d9048e98afb14b0ff4ebdcb821c35 (patch)
tree3a6edd982ae2cb9e644665bdaae246f8f555af7f /src/quicktemplates2/qquickdrawer.cpp
parentc8e9b5f25fb12c3b7983658d738165181b4d6672 (diff)
Prepare QQuickPopup for touch event handling
Add acceptTouch() and handlePress/Move/Release/Ungrab() to QQuickPopupPrivate, similarly to the recent changes to QQuickControl. Task-number: QTBUG-58389 Change-Id: I45bc0c51f7db79d0d3291f4beee6dab45b158e8a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickdrawer.cpp')
-rw-r--r--src/quicktemplates2/qquickdrawer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickdrawer.cpp b/src/quicktemplates2/qquickdrawer.cpp
index b4a7190a..ca1df07e 100644
--- a/src/quicktemplates2/qquickdrawer.cpp
+++ b/src/quicktemplates2/qquickdrawer.cpp
@@ -644,6 +644,14 @@ bool QQuickDrawer::overlayEvent(QQuickItem *item, QEvent *event)
{
Q_D(QQuickDrawer);
switch (event->type()) {
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd:
+ case QEvent::TouchCancel:
+ // TODO: QQuickDrawer still relies on synthesized mouse events
+ event->ignore();
+ return false;
+
case QEvent::MouseButtonPress:
d->tryClose(item, static_cast<QMouseEvent *>(event));
return d->handleMousePressEvent(item, static_cast<QMouseEvent *>(event));