macOS: Remove stale code for handling view hiding during reparenting

Commit a2bdda8e3b added an unconditional hide of child NSViews,
which was found to be too strict, and worked around in a199a87ad
by undoing the hide during setParent(). The unconditional hide
was then changed in 89842b97d7 to use the visibility state of
the window, which means the workaround in a199a87ad is no longer
needed.

Change-Id: If0df2de65693e03c5fb53a906b1399accab3fcc4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Tor Arne Vestbø 2020-07-21 14:15:05 +02:00
parent a54639acd2
commit ac9497a0ef
1 changed files with 2 additions and 4 deletions

View File

@ -1105,11 +1105,9 @@ void QCocoaWindow::setParent(const QPlatformWindow *parentWindow)
{
qCDebug(lcQpaWindow) << "QCocoaWindow::setParent" << window() << (parentWindow ? parentWindow->window() : 0);
// recreate the window for compatibility
bool unhideAfterRecreate = parentWindow && !isEmbedded() && ![m_view isHidden];
// Recreate in case we need to get rid of a NSWindow, or create one
recreateWindowIfNeeded();
if (unhideAfterRecreate)
[m_view setHidden:NO];
setCocoaGeometry(geometry());
}