From 161273479087f4b7c10a096d241d081339e6636f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sat, 7 Sep 2024 12:58:15 +0200 Subject: [PATCH] iOS: Remove safe area workaround for iOS < 11 We no longer support these iOS versions. Change-Id: Ifcb2d0201ccc5017a088a05e491bcd0f4bfaa0e2 Reviewed-by: Timur Pocheptsov (cherry picked from commit 9fbfe72649c6637256766472ac8025dafe4fb778) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/ios/quiview.mm | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index b31e1a043dc..7796e93c16d 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -60,26 +60,6 @@ inline ulong getTimeStamp(UIEvent *event) CGPoint m_lastScrollDelta; } -+ (void)load -{ -#if !defined(Q_OS_TVOS) && !defined(Q_OS_VISIONOS) - if (QOperatingSystemVersion::current() < QOperatingSystemVersion(QOperatingSystemVersion::IOS, 11)) { - // iOS 11 handles this though [UIView safeAreaInsetsDidChange], but there's no signal for - // the corresponding top and bottom layout guides that we use on earlier versions. Note - // that we use the _will_ change version of the notification, because we want to react - // to the change as early was possible. But since the top and bottom layout guides have - // not been updated at this point we use asynchronous delivery of the event, so that the - // event is processed by QtGui just after iOS has updated the layout margins. - [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillChangeStatusBarFrameNotification - object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *) { - for (QWindow *window : QGuiApplication::allWindows()) - QWindowSystemInterface::handleSafeAreaMarginsChanged(window); - } - ]; - } -#endif -} - + (Class)layerClass { #if QT_CONFIG(opengl)