diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2022-08-15 15:55:48 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2022-08-18 19:53:21 +0200 |
commit | 0250f9364fbf31950601bf27c2a93c520c4abd80 (patch) | |
tree | 3f9134cd75ca6d49ae234b70e3011b4c911ef9c2 /tests/auto/corelib/time | |
parent | 78c85616585d3e6b9346d0a0ed236c23127b3810 (diff) |
iOS: use NSProcessInfo to resolve timestamps in simulator builds
We currently build Qt for simulator using X86_64, even
on ARM based macs. This results in the simulator running
on ARM, while the app is running inside it using Rosetta.
And with this combination, the event.timestamp, which is
documented to be in seconds, looks to be something else, and
is not progressing in sync with a normal clock.
Sending out mouse events with a timestamp that doesn't follow
normal clock time will cause problems for mouse-, and pointer
handlers that uses them to e.g calculate the time between a
press and release, and to decide if the user is performing a tap
or a drag.
For that reason, we choose to ignore UIEvent.timestamp under
the mentioned condition, and instead rely on NSProcessInfo.
Note that if we force the whole simulator to use Rosetta
(and not only the Qt app), the timestamps will progress normally.
Fixes: QTBUG-105810
Pick-to: 6.4 6.3 6.2
Change-Id: Ib4e60593cac3230567ebc53d634f434fcefc98d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/corelib/time')
0 files changed, 0 insertions, 0 deletions