diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-10-28 07:51:26 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-10-30 12:19:53 +0100 |
commit | 7b911a65d238d68177a69feb773b3c9d803f6ef4 (patch) | |
tree | b16a6954d72a91782992786c5296b7528da7cf45 /src/quick/items/qquickpincharea_p.h | |
parent | 0fa6091b1076bc3cc58303ff00d43efdad32b8ad (diff) |
Modernize event handling in PinchArea
Worrying about the window's touchmouse is really not a relevant concern
for a touch-only item; and grabs are done by grabbing the specific
points that the pincharea chooses to handle, not by grabbing the
touchmouse. We simply didn't have suitable API in Qt 5.
Also some drive-by fixes: better packing and initialization in
QQuickPinchAreaPrivate; and the stealMouse variable has only
been set, not checked, for a long time, so we can remove it.
Remove unimplemented handlePress() and handleRelease().
Change-Id: Ia76dc9b9974f663b13c4bb9dac32efe8ed7815c5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/quick/items/qquickpincharea_p.h')
-rw-r--r-- | src/quick/items/qquickpincharea_p.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/quick/items/qquickpincharea_p.h b/src/quick/items/qquickpincharea_p.h index b488f436df..124f0fe5d3 100644 --- a/src/quick/items/qquickpincharea_p.h +++ b/src/quick/items/qquickpincharea_p.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtSG module of the Qt Toolkit. @@ -300,12 +300,10 @@ protected: bool event(QEvent *) override; private: - void clearPinch(); - void cancelPinch(); - void updatePinch(); + void clearPinch(QTouchEvent *event); + void cancelPinch(QTouchEvent *event); + void updatePinch(QTouchEvent *event, bool filtering); void updatePinchTarget(); - void handlePress(); - void handleRelease(); private: Q_DISABLE_COPY(QQuickPinchArea) |