summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/ios/qiosglobal.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qiosglobal.mm b/src/plugins/platforms/ios/qiosglobal.mm
index f9b4b14a19..69547fb2a1 100644
--- a/src/plugins/platforms/ios/qiosglobal.mm
+++ b/src/plugins/platforms/ios/qiosglobal.mm
@@ -117,9 +117,9 @@ QRect fromPortraitToPrimary(const QRect &rect)
{
// UIScreen is always in portrait. Use this function to convert CGRects
// aligned with UIScreen into whatever is the current orientation of QScreen.
- QScreen *screen = QGuiApplication::primaryScreen();
- return screen->isPortrait(screen->primaryOrientation()) ? rect
- : QRect(rect.y(), screen->geometry().width() - rect.width() - rect.x(), rect.height(), rect.width());
+ QRect geometry = QGuiApplication::primaryScreen()->handle()->geometry();
+ return geometry.width() < geometry.height() ? rect
+ : QRect(rect.y(), geometry.width() - rect.width() - rect.x(), rect.height(), rect.width());
}
QT_END_NAMESPACE