diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-07 13:59:50 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-03-28 13:22:11 +0100 |
commit | c4f59f96b91c266aa2aea3c80a5c7e3d1f417e4a (patch) | |
tree | 65fdd9849772f0c118dab6ba09c3d8e6d5db89ed /src/plugins/platforms/cocoa | |
parent | a4bd121125dade1a0c292284836ea52617ba77c0 (diff) |
macOS: Simplify child window parenting in recreateWindowIfNeeded()
The logic for this should ideally be handled in setParent(), but
for now let's clean up the code a tiny bit.
Pick-to: 6.5
Change-Id: Id2370d6704625038ab6b4fa246dea5d1c037371c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 83b6586a32..9ef7e5f4fc 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1505,9 +1505,7 @@ void QCocoaWindow::recreateWindowIfNeeded() } } - if (isEmbeddedView) { - // An embedded window doesn't have its own NSWindow. - } else if (parentWindow) { + if (parentCocoaWindow) { // Child windows have no NSWindow, re-parent to superview instead [parentCocoaWindow->m_view addSubview:m_view]; } |