<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quick/handlers/qquickpinchhandler.cpp, branch 6.4.0</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>PinchHandler: Enforce min/max scale limits with native gestures</title>
<updated>2022-09-02T00:40:29+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2022-09-01T05:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9e2705e0271bc3f39ca6c9f572e6061d5ac2c2ae'/>
<id>9e2705e0271bc3f39ca6c9f572e6061d5ac2c2ae</id>
<content type='text'>
So far the qBound() using m_minimumScale and m_maximumScale was only
applied for normal pointer events: there were no limits when using a
touchpad that sends native gestures.

Fixes: QTBUG-106110
Change-Id: Ibf8d955e5f1dac517e0a3e9588fb117d83f443a6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 5cb3ba93da2673b20abae8a544a961b7b57dff45)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far the qBound() using m_minimumScale and m_maximumScale was only
applied for normal pointer events: there were no limits when using a
touchpad that sends native gestures.

Fixes: QTBUG-106110
Change-Id: Ibf8d955e5f1dac517e0a3e9588fb117d83f443a6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
(cherry picked from commit 5cb3ba93da2673b20abae8a544a961b7b57dff45)
Reviewed-by: Qt Cherry-pick Bot &lt;cherrypick_bot@qt-project.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use SPDX license identifiers</title>
<updated>2022-06-14T15:44:31+00:00</updated>
<author>
<name>Lucie Gérard</name>
<email>lucie.gerard@qt.io</email>
</author>
<published>2022-05-13T13:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=99f501c2fca1c8cc33b48ff694c9243b92d0742c'/>
<id>99f501c2fca1c8cc33b48ff694c9243b92d0742c</id>
<content type='text'>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
(cherry picked from commit 0dc4fd240a2897c5c443a0ef6d84c416843e4938)
Reviewed-by: Jörg Bornemann &lt;joerg.bornemann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
(cherry picked from commit 0dc4fd240a2897c5c443a0ef6d84c416843e4938)
Reviewed-by: Jörg Bornemann &lt;joerg.bornemann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Quick: includemocs</title>
<updated>2022-04-29T18:37:13+00:00</updated>
<author>
<name>Marc Mutz</name>
<email>marc.mutz@qt.io</email>
</author>
<published>2022-04-28T15:43:38+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=6a23f186138dff2a7007288a02702bce23d7ca70'/>
<id>6a23f186138dff2a7007288a02702bce23d7ca70</id>
<content type='text'>
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102948
Change-Id: I695daa12613de3bada67eb69a26a8dce07c4b85e
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102948
Change-Id: I695daa12613de3bada67eb69a26a8dce07c4b85e
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Document PinchHandler's active property as read-only</title>
<updated>2021-10-26T13:02:19+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2021-10-18T13:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=ffe80b72367083348abffabef3c565e8f10c4865'/>
<id>ffe80b72367083348abffabef3c565e8f10c4865</id>
<content type='text'>
The property is declared in QQuickPointerHandler, and it has no setter.

Change-Id: Ica97ae3fb47d41755d722ce5597362d9b8e56ad4
Pick-to: 6.2
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The property is declared in QQuickPointerHandler, and it has no setter.

Change-Id: Ica97ae3fb47d41755d722ce5597362d9b8e56ad4
Pick-to: 6.2
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Respect PinchHandler min/maximumPointCount props with native gestures</title>
<updated>2021-07-09T11:17:06+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2021-07-08T20:53:59+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=eb169146ceb8167214e0ea4f41b530fe8b2cc6a1'/>
<id>eb169146ceb8167214e0ea4f41b530fe8b2cc6a1</id>
<content type='text'>
QNativeGestureEvent::fingerCount() is new in 6.2, and on Wayland
touchpads it's actually populated, so we can now do this.

Fixes: QTBUG-95070
Pick-to: 6.2
Change-Id: Ia365ff34003be8ae8f7f860c195f08b66f6c4a4e
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QNativeGestureEvent::fingerCount() is new in 6.2, and on Wayland
touchpads it's actually populated, so we can now do this.

Fixes: QTBUG-95070
Pick-to: 6.2
Change-Id: Ia365ff34003be8ae8f7f860c195f08b66f6c4a4e
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: Remove bogus PinchHandler.minimumTouchPoints prop; improve actual</title>
<updated>2021-07-09T11:17:02+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2021-07-08T20:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a04d98787dc5c816569a6eecce695a8d80257c05'/>
<id>a04d98787dc5c816569a6eecce695a8d80257c05</id>
<content type='text'>
PinchHandler.minimumTouchPoints was probably just an early idea for the
name, because MultiPointTouchArea has it. Anyway it's now honoring the
inherited minimum/maximumPointCount properties from MultiPointHandler.

Pick-to: 5.12 5.15 6.1 6.2
Change-Id: I6408da9dfe1d31a38da2777efa2c5d79ad17390f
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PinchHandler.minimumTouchPoints was probably just an early idea for the
name, because MultiPointTouchArea has it. Anyway it's now honoring the
inherited minimum/maximumPointCount properties from MultiPointHandler.

Pick-to: 5.12 5.15 6.1 6.2
Change-Id: I6408da9dfe1d31a38da2777efa2c5d79ad17390f
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Update sceneGrabPosition in MultiPointHandler's points, on grab</title>
<updated>2021-06-02T08:18:03+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2021-06-01T11:02:44+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=19b6f9591257b3a07bf1479bcc2d676e57506447'/>
<id>19b6f9591257b3a07bf1479bcc2d676e57506447</id>
<content type='text'>
We seem to have gotten by without this somehow; but the debug output
in QQuickPinchHandler::handlePointerEventImpl() made it clear that it
wasn't being done: it would always say the points moved from 0,0 to
their present locations.

Change-Id: If611adea6ecf0c056ae7d9b34ca86a7530cfc144
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We seem to have gotten by without this somehow; but the debug output
in QQuickPinchHandler::handlePointerEventImpl() made it clear that it
wasn't being done: it would always say the points moved from 0,0 to
their present locations.

Change-Id: If611adea6ecf0c056ae7d9b34ca86a7530cfc144
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PinchHandler: scale incrementally when new pinch gesture begins</title>
<updated>2021-03-25T08:15:18+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2021-03-23T08:23:52+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=fc636af3a723ee8b4ee42cf71864ae0df5ca4621'/>
<id>fc636af3a723ee8b4ee42cf71864ae0df5ca4621</id>
<content type='text'>
When the gesture begins, we begin multiplying the target item's scale
by 1.0 at first; it doesn't make sense to start immediately with
the accumulated scale remembered from previous pinch gestures, because
the target item remembers its own scale.

When QQuickPinchHandler::wantsPointerEvent() returns false because
some irrelevant gesture was received (for example a PanNativeGesture),
that's not a good reason to deactivate.  Deactivating and re-activating
with each ZoomNativeGesture event results in extreme behavior, because
PinchHandler depends on the BeginNativeGesture and EndNativeGesture
events to reset internal state.  Likewise, the fact that the button
state is NoButton is not a good reason for wantsPointerEvent() to
return false.

Added an autotest: the first of its kind that actually simulates the
native gesture events.

Fixes: QTBUG-92064
Pick-to: 5.15 6.0 6.1
Change-Id: I3a9b92d70f99497ee58ad8557d90d521fbe16d41
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the gesture begins, we begin multiplying the target item's scale
by 1.0 at first; it doesn't make sense to start immediately with
the accumulated scale remembered from previous pinch gestures, because
the target item remembers its own scale.

When QQuickPinchHandler::wantsPointerEvent() returns false because
some irrelevant gesture was received (for example a PanNativeGesture),
that's not a good reason to deactivate.  Deactivating and re-activating
with each ZoomNativeGesture event results in extreme behavior, because
PinchHandler depends on the BeginNativeGesture and EndNativeGesture
events to reset internal state.  Likewise, the fact that the button
state is NoButton is not a good reason for wantsPointerEvent() to
return false.

Added an autotest: the first of its kind that actually simulates the
native gesture events.

Fixes: QTBUG-92064
Pick-to: 5.15 6.0 6.1
Change-Id: I3a9b92d70f99497ee58ad8557d90d521fbe16d41
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove QQuickPointerEvent etc.; deliver QPointerEvents directly</title>
<updated>2020-09-18T18:56:25+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2020-07-23T11:56:26+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a97759a336c597327cb82eebc9f45c793aec32c9'/>
<id>a97759a336c597327cb82eebc9f45c793aec32c9</id>
<content type='text'>
QEventPoint does not have an accessor to get the QPointerEvent that it
came from, because that's inconsistent with the idea that QPointerEvent
instances are temporary, stack-allocated and movable (the pointer would
often be wrong or null, therefore could not be relied upon).
So most functions that worked directly with QQuickEventPoint before
(which fortunately are still private API) now need to receive the
QPointerEvent too, which we choose to pass by pointer. QEventPoint is
always passed by reference (const where possible) to be consistent with
functions in QPointerEvent that take QEventPoint by reference.

QEventPoint::velocity() should be always in scene coordinates now, which
saves us the trouble of transforming it to each item's coordinate system
during delivery, but means that it will need to be done in handlers or
applications sometimes.  If we were going to transform it, it would be
important to also store the sceneVelocity separately in QEventPoint
so that the transformation could be done repeatedly for different items.

Task-number: QTBUG-72173
Change-Id: I7ee164d2e6893c4e407fb7d579c75aa32843933a
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QEventPoint does not have an accessor to get the QPointerEvent that it
came from, because that's inconsistent with the idea that QPointerEvent
instances are temporary, stack-allocated and movable (the pointer would
often be wrong or null, therefore could not be relied upon).
So most functions that worked directly with QQuickEventPoint before
(which fortunately are still private API) now need to receive the
QPointerEvent too, which we choose to pass by pointer. QEventPoint is
always passed by reference (const where possible) to be consistent with
functions in QPointerEvent that take QEventPoint by reference.

QEventPoint::velocity() should be always in scene coordinates now, which
saves us the trouble of transforming it to each item's coordinate system
during delivery, but means that it will need to be done in handlers or
applications sometimes.  If we were going to transform it, it would be
important to also store the sceneVelocity separately in QEventPoint
so that the transformation could be done repeatedly for different items.

Task-number: QTBUG-72173
Change-Id: I7ee164d2e6893c4e407fb7d579c75aa32843933a
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove deprecated PinchHandler.m{in,ax}imum{X,Y} for Qt 6</title>
<updated>2020-02-26T15:42:51+00:00</updated>
<author>
<name>Jan Arve Sæther</name>
<email>jan-arve.saether@qt.io</email>
</author>
<published>2020-02-25T15:21:05+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=98d088d6e31c6c1bafea5674c9003d846b572680'/>
<id>98d088d6e31c6c1bafea5674c9003d846b572680</id>
<content type='text'>
Change-Id: Id941d7dc6b6ce9207db09cf4790f4401515dbda5
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Id941d7dc6b6ce9207db09cf4790f4401515dbda5
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
