As of Qt 6 (3e12951c0b, the QScreen's
orientation() property is supposed to represent the orientation
of the screen from a window management perspective, and not the
orientation of the actual device, as in Qt 5 times.
For iOS, when the orientation of the app is locked to a orientation
via the Info.plist or [UIViewController supportedInterfaceOrientations],
the UIDevice API will keep reporting the actual orientation of the device,
which is wrong for the Qt 6 definition of the API.
We currently don't have an API in QScreen to represent the always
updating physical rotation of the device. For this use-case the
supported API is QOrientationReading in Qt Sensors.
[ChangeLog][iOS] QScreen::orientation() will no longer report the
device's physical orientation when orientation has been locked
to a subset of the available orientations, but will instead
match the primary orientation.
Task-number: QTBUG-38576
Task-number: QTBUG-121781
Change-Id: I251a039a618656466cbfd1d836a5b49a6be8e736
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>