aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcontrol_p_p.h
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2020-02-07 11:33:50 +0100
committerAndy Shaw <andy.shaw@qt.io>2020-02-07 15:30:12 +0100
commit025f938c1b4676782674d54375e1e4e560e4b6cd (patch)
tree9dc4d3ec2c181caf987e9c7d80e3dffca2cf8c77 /src/quicktemplates2/qquickcontrol_p_p.h
parentb10912ba731144e8c41cbfa35fb1553ad04b2b88 (diff)
Account for when a touch event is synthesized by Qt as a mouse event
When a control is on a Flickable with a pressDelay then any press events sent from a touch device will be replayed as mouse events due to the delay. As a result we cannot depend on the fact that we got the first press as a touch event when checking if the id matches before accepting it. So we need to keep the previous pos when it is a synthesized mouse event so we can ensure the release is also accepted. Fixes: QTBUG-77202 Change-Id: I6f5d8506bd803daf834093e8fd412504150c4ca6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickcontrol_p_p.h')
-rw-r--r--src/quicktemplates2/qquickcontrol_p_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickcontrol_p_p.h b/src/quicktemplates2/qquickcontrol_p_p.h
index a657307b..1b59f86d 100644
--- a/src/quicktemplates2/qquickcontrol_p_p.h
+++ b/src/quicktemplates2/qquickcontrol_p_p.h
@@ -224,7 +224,9 @@ public:
bool explicitHoverEnabled = false;
#endif
bool resizingBackground = false;
+ bool pressWasTouch = false;
int touchId = -1;
+ QPointF previousPressPos;
qreal padding = 0;
qreal horizontalPadding = 0;
qreal verticalPadding = 0;