qt6-bb10/tests/auto/gui
Shawn Rutledge c7c28b3406 Separate QPD::tabletDevice into priv tabletDevice and queryTabletDevice
There doesn't seem to be any reason users will need to query tablet
devices by their IDs, because every event comes with a complete
instance already, and we have QInputDevice::devices() to list them all.

QPointingDevicePrivate::tabletDevice() can create a new instance if a
matching one is not found (and complains about that); it's intended
for use in QtGui, as a way to find the device if it was not part of the
QWSI event. Now it sets the parent of those auto-created instances
to QCoreApplication to avoid a memory leak.

On the other hand, queryTabletDevice() is intended for use in platform plugins
that need to check whether an instance exists; but they will take care
of creating new instances themselves, and thus have more control over the
parent and the details being stored. Now that the systemId can also be given,
the search is more likely to have a unique result, on window systems
that provide device IDs.

Rename id() to systemId() to clarify that it's a system-specific unique
device ID of some sort, not the same as the uniqueId that a stylus has.
However it seems that in practice, this will often be 0; so clarify that
if it's not unique, QInputDevicePrivate::fromId() and queryTabletDevice()
may not always find the right instance.

Clarify the function usage via comments.

Change-Id: I82bb8d1c26eeaf06f07c290828aa17ec4a31646b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-07 16:14:58 +00:00
..
image Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
itemmodels Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
kernel Separate QPD::tabletDevice into priv tabletDevice and queryTabletDevice 2020-07-07 16:14:58 +00:00
math3d Revert "Remove flagBits from QMatrix4x4" 2020-03-04 15:54:38 +00:00
painting Fix floating point clip rectangle rounding in raster and opengl paint engine 2020-07-07 11:50:09 +02:00
qopengl Add ; to Q_UNUSED 2020-07-07 11:51:48 +02:00
qopenglconfig Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
qvulkan Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
rhi CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
text Add ; to Q_UNUSED 2020-07-07 11:51:48 +02:00
util Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
.prev_CMakeLists.txt Remove winrt 2020-06-06 20:25:49 +02:00
CMakeLists.txt Remove winrt 2020-06-06 20:25:49 +02:00
gui.pro Remove winrt 2020-06-06 20:25:49 +02:00