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>