Go to file
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
.github/workflows GitHub Actions: Fix workflow file 2020-09-11 13:37:48 +02:00
bin CMake: Fix argument passing for configure.bat / qt-configure-module.bat 2020-10-30 08:22:30 +01:00
cmake cmake: Set a warning flag based on the target arch, not build host 2020-11-03 21:36:35 +02:00
coin CMake: Provide a qt-internal-configure-tests script 2020-10-26 15:23:25 +01:00
config.tests CMake: Skip regeneration of manual compile test project 2020-04-09 11:26:46 +02:00
dist Remove last remainings of Qt Quick 1 imports 2020-05-25 11:48:12 +02:00
doc Doc: Add macro to exclude examples from Creator 2020-10-27 11:49:39 +00:00
examples Get rid of all instance usage of QFontDatabase 2020-11-03 20:36:34 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Allow adding linker flags to qmake module pris 2020-11-03 00:14:04 +01:00
qmake qmake/vcxproj: Fix handling of extra compiler outputs 2020-11-02 15:31:01 +01:00
src Add QEventPoint::normalizedPosition() to replace normalizedPos() 2020-11-03 20:36:35 +01:00
tests Add QEventPoint::normalizedPosition() to replace normalizedPos() 2020-11-03 20:36:35 +01:00
util CMake: pro2cmake: Generate correct CONFIG_MODULE_NAME values 2020-10-30 17:48:57 +01:00
.cmake.conf CMake: Bump the minimum required CMake version to build Qt to 3.18 2020-11-03 13:06:14 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore .gitignore: Qt Creator files cleanup 2020-09-25 07:50:15 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.prev_configure.cmake CMake: Introduce CMake-only optimize_full feature 2020-10-06 10:07:08 +02:00
.prev_qt_cmdline.cmake CMake: Regenerate configure.cmake files 2020-09-28 15:48:17 +02:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt CMake: Bump the minimum required CMake version to build Qt to 3.18 2020-11-03 13:06:14 +01:00
config_help.txt CMake: Let configure guess the compiler from mkspec argument 2020-11-02 16:33:40 +01:00
configure Default to cmake when building Qt 2020-11-02 15:36:13 +00:00
configure.bat CMake: Fix Windows top-level configure.bat 2020-11-03 13:06:14 +01:00
configure.cmake CMake: Allow Debug-only iOS builds 2020-10-16 13:53:03 +02:00
configure.json By default don't try to use pkg-config when targeting Android 2020-09-28 15:48:17 +02:00
configure.pri Android: allow setting javac build version from the configure script 2020-09-16 20:55:08 +03:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake CMake: Fix the -sanitize configure option 2020-10-12 13:57:56 +02:00
qtbase.pro Update qmake before building src 2020-08-19 18:25:51 +02:00
sync.profile Export gbm device integration to build it outside 2020-10-23 16:46:02 +09:00