Skip to content

Commit

Permalink
QIOSTextInputOverlay: Use new presentationWindow to access keyWindow
Browse files Browse the repository at this point in the history
Accessing the keyWindow through UIApplication keyWindow was causing a
crash.

Fixes: QTBUG-125089
Change-Id: Ie02afd7875b490c1f72ff2e827ffa2204d0e9e81
Reviewed-by: Tor Arne Vestbø <[email protected]>
  • Loading branch information
dorisverria1 authored and torarnv committed May 6, 2024
1 parent 432ae2e commit 1ffa41d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/platforms/ios/qiostextinputoverlay.mm
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ - (void)setEnabled:(BOOL)enabled

if (enabled) {
_focusView = [reinterpret_cast<UIView *>(qApp->focusWindow()->winId()) retain];
_desktopView = [qt_apple_sharedApplication().keyWindow.rootViewController.view retain];
_desktopView = [presentationWindow(nullptr).rootViewController.view retain];
Q_ASSERT(_focusView && _desktopView && _desktopView.superview);
[_desktopView addGestureRecognizer:self];
} else {
Expand Down

0 comments on commit 1ffa41d

Please sign in to comment.