qt5base-lts/tests/auto/gui
Shawn Rutledge f6418343f1 Add QEventPoint::normalizedPosition() to replace normalizedPos()
In 4e400369c0 we deprecated
normalizedPos() because we suspect it's a legacy feature that few
users will need.  However Qt developers keep bringing up the continued
usage in autotests over and over.  (It's IMO not wrong to keep testing
deprecated functions in autotests, but the warning keeps attracting
attention.)

Of course it will turn out that normalizedPos() has users; we just
don't know how many.  One way to look at it is: why should they copy
a snippet of code to calculate it, when it costs us so little to
continue to provide this accessor.

It might also turn out that some users will complain that in Qt 5
it was passed through from the device driver (or at least from the
window system API) to the application, and perhaps the replacement will
not always work, for example if availableVirtualGeometry() ends up
wrong, or there is some strange scenario that generates events that are
out-of-bounds for the device that the event professes to come from, so
that the "normalized" coordinates also go outside the [0..1] range.
We reserve the right to put back the storage in QEventPointPrivate if
the need arises; so that's why this function is not inline.

We continue to hope that startNormalizedPos() and lastNormalizedPos()
are used even less and won't be missed much, because it would be
wasteful to store them all the time if only a few users need them.

Change-Id: I23ed78843e3f9e16133c5b6f462884a3845f91b6
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-03 20:36:35 +01:00
..
image Test QImage move semantics 2020-10-16 18:49:01 +02:00
itemmodels CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
kernel Add QEventPoint::normalizedPosition() to replace normalizedPos() 2020-11-03 20:36:35 +01:00
math3d Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
painting Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qopengl Rename the new platform APIs from QPlatformInterface to QNativeInterface 2020-10-07 13:03:27 +02:00
qopenglconfig Deprecate QVariant::Type 2020-10-23 09:58:57 +02:00
qvulkan CMake: Regenerate projects to use new qt_internal_ API 2020-09-23 16:59:06 +02:00
rhi rhi: Make the new direct buffer update available for non-uniform buffers 2020-10-12 07:55:37 +02:00
text Get rid of all instance usage of QFontDatabase 2020-11-03 20:36:34 +01:00
util Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +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