<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quick/handlers/qquickpointerdevicehandler.cpp, branch wip/nativemenus</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>Accept mouse or touchpad in snippets with acceptedDevices</title>
<updated>2024-02-21T13:27:53+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2024-02-17T04:49:42+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=32a56ba8f08ddefa3d20c3003ed8599553b6d960'/>
<id>32a56ba8f08ddefa3d20c3003ed8599553b6d960</id>
<content type='text'>
This is a workaround for platforms (such as Wayland and macOS) that are
sometimes failing to distinguish mouse and touchpad. It's better for
illustrative purposes anyway, since a laptop user may really be using a
touchpad rather than a mouse, and we hope to eventually distinguish
them on as many platforms as possible.

Task-number: QTBUG-63363
Task-number: QTBUG-112432
Pick-to: 6.5 6.6 6.7
Change-Id: Ic7a374f1257d4aa57f29385b44da85ccaf4f5ec6
Reviewed-by: Santhosh Kumar &lt;santhosh.kumar.selvaraj@qt.io&gt;
Reviewed-by: Doris Verria &lt;doris.verria@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a workaround for platforms (such as Wayland and macOS) that are
sometimes failing to distinguish mouse and touchpad. It's better for
illustrative purposes anyway, since a laptop user may really be using a
touchpad rather than a mouse, and we hope to eventually distinguish
them on as many platforms as possible.

Task-number: QTBUG-63363
Task-number: QTBUG-112432
Pick-to: 6.5 6.6 6.7
Change-Id: Ic7a374f1257d4aa57f29385b44da85ccaf4f5ec6
Reviewed-by: Santhosh Kumar &lt;santhosh.kumar.selvaraj@qt.io&gt;
Reviewed-by: Doris Verria &lt;doris.verria@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Quick: Update documentation of TapHandler to reflect renamed enum</title>
<updated>2023-05-05T20:24:52+00:00</updated>
<author>
<name>David Edmundson</name>
<email>davidedmundson@kde.org</email>
</author>
<published>2023-05-05T09:39:58+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=aec61932ae84cc822ff19b5d15e3aa22c6c0607a'/>
<id>aec61932ae84cc822ff19b5d15e3aa22c6c0607a</id>
<content type='text'>
PointerDevice.GenericPointer was the enum value in Qt5, but in Qt6 this
changed to PointerDevice.Generic

Pick-to: 6.2 6.5
Change-Id: Ic5e4a5fe5fd91f7478d00e0d2c643b99eaa7ab14
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PointerDevice.GenericPointer was the enum value in Qt5, but in Qt6 this
changed to PointerDevice.Generic

Pick-to: 6.2 6.5
Change-Id: Ic5e4a5fe5fd91f7478d00e0d2c643b99eaa7ab14
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: Customize and update docs for PointHandler</title>
<updated>2023-03-14T21:15:15+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2023-03-01T10:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=4c6d0b2bf09329dd8b036761f8f2924f54af3a07'/>
<id>4c6d0b2bf09329dd8b036761f8f2924f54af3a07</id>
<content type='text'>
Many of the inherited docs were inappropriate or insufficiently specific
to PointHandler. Now we have more snippets with more ideas for how it
can be used.

As a drive-by, fix a typo in the docs for
PointerDeviceHandler::acceptedPointerTypes and add a link to the new
PointerDevice page added in e283c05af745210d4a1f6c0aa9c33bf4da23a1e0

Pick-to: 6.2 6.4 6.5 6.5.0
Fixes: QTBUG-74020
Fixes: QTBUG-106878
Change-Id: I028e1577ac5d4ef0b927c94259d6ab25b6028885
Reviewed-by: Doris Verria &lt;doris.verria@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many of the inherited docs were inappropriate or insufficiently specific
to PointHandler. Now we have more snippets with more ideas for how it
can be used.

As a drive-by, fix a typo in the docs for
PointerDeviceHandler::acceptedPointerTypes and add a link to the new
PointerDevice page added in e283c05af745210d4a1f6c0aa9c33bf4da23a1e0

Pick-to: 6.2 6.4 6.5 6.5.0
Fixes: QTBUG-74020
Fixes: QTBUG-106878
Change-Id: I028e1577ac5d4ef0b927c94259d6ab25b6028885
Reviewed-by: Doris Verria &lt;doris.verria@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>TapHandler: ignore untracked moving points; treat touchpad as mouse</title>
<updated>2023-02-21T06:02:19+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2023-02-01T15:51:42+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=7ef3bee4f275736abb716505a93cdc5ddadff36b'/>
<id>7ef3bee4f275736abb716505a93cdc5ddadff36b</id>
<content type='text'>
TapHandler must decide on press whether it's interested in tracking a
particular point further, to see if a qualifying tap occurs, and should
only care about those points it decided to track. But if it did not
decide to track it, wantsEventPoint() should never care about the point
movement after press; nor about hovering points either.

The line in QQuickPointerDeviceHandler::wantsPointerEvent() checking
pointingDevice()-&gt;pointerType() != Finger was also making touchpad
behavior inconsistent with mouse behavior, which is why this bug
appeared on macOS but not on Linux: QQuickPointerDeviceHandler needs
to care about the incoming event's buttons on all devices except
touchscreens. It's probably been causing other symptoms on touchpads
since a97760a336c597327cb82eebc9f45c793aec32c9.

For the test, a05cbaaae505dba2546c593e22fe2f9047c0de4b restored the
cumulative native gesture scaling as it should be: so if we try to
scale by 1.1 twice in a row, the result is it's scaled by 1.21.

Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-108896
Change-Id: I3da8878648b89cce5d1a48fa02dffaefead2ac90
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Doris Verria &lt;doris.verria@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TapHandler must decide on press whether it's interested in tracking a
particular point further, to see if a qualifying tap occurs, and should
only care about those points it decided to track. But if it did not
decide to track it, wantsEventPoint() should never care about the point
movement after press; nor about hovering points either.

The line in QQuickPointerDeviceHandler::wantsPointerEvent() checking
pointingDevice()-&gt;pointerType() != Finger was also making touchpad
behavior inconsistent with mouse behavior, which is why this bug
appeared on macOS but not on Linux: QQuickPointerDeviceHandler needs
to care about the incoming event's buttons on all devices except
touchscreens. It's probably been causing other symptoms on touchpads
since a97760a336c597327cb82eebc9f45c793aec32c9.

For the test, a05cbaaae505dba2546c593e22fe2f9047c0de4b restored the
cumulative native gesture scaling as it should be: so if we try to
scale by 1.1 twice in a row, the result is it's scaled by 1.21.

Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-108896
Change-Id: I3da8878648b89cce5d1a48fa02dffaefead2ac90
Reviewed-by: Qt CI Bot &lt;qt_ci_bot@qt-project.org&gt;
Reviewed-by: Doris Verria &lt;doris.verria@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QtQuick: Fix type issues with QQuickPointHandlers</title>
<updated>2022-08-01T07:53:13+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2022-07-29T03:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=a32033f4eabe4dc503211005185c4d9e44f03c50'/>
<id>a32033f4eabe4dc503211005185c4d9e44f03c50</id>
<content type='text'>
Now uses the proper enums and exposes all necessary classes to QML.

Change-Id: I04cc390469c5811ad4683454b460829fa1e86582
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now uses the proper enums and exposes all necessary classes to QML.

Change-Id: I04cc390469c5811ad4683454b460829fa1e86582
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use SPDX license identifiers</title>
<updated>2022-06-11T06:05:15+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=0dc4fd240a2897c5c443a0ef6d84c416843e4938'/>
<id>0dc4fd240a2897c5c443a0ef6d84c416843e4938</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.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@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.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@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>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>Doc: Fix documentation warnings for Qt Quick</title>
<updated>2020-11-05T08:00:48+00:00</updated>
<author>
<name>Topi Reinio</name>
<email>topi.reinio@qt.io</email>
</author>
<published>2020-11-04T11:37:45+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0b12055548a8781b0c328991c267d62222667e8e'/>
<id>0b12055548a8781b0c328991c267d62222667e8e</id>
<content type='text'>
- Remove links to modules and examples that are not part of Qt 6.
- Remove links to entities marked as \internal
- Add missing enum value and QML property docs where it's trivial
  to do so.

Task-number: QTBUG-88156
Change-Id: I10a1c7bcc5fe0e2354ea69eaf24930362edb7415
Reviewed-by: Paul Wicking &lt;paul.wicking@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove links to modules and examples that are not part of Qt 6.
- Remove links to entities marked as \internal
- Add missing enum value and QML property docs where it's trivial
  to do so.

Task-number: QTBUG-88156
Change-Id: I10a1c7bcc5fe0e2354ea69eaf24930362edb7415
Reviewed-by: Paul Wicking &lt;paul.wicking@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>
</feed>
