Cocoa: Don't hide views when reparenting

Commit a2bdda8e3b was meant for creation only. We should not
hide views on our own, particularly when Qt had not asked for that.

Task-number: QTBUG-33581
Change-Id: Ib35fc78a27be1498f80aabd385e7a2185475b949
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Gabriel de Dietrich 2013-11-04 16:08:08 +01:00 committed by The Qt Project
parent f2720a806e
commit a199a87ad5

View File

@ -713,7 +713,10 @@ WId QCocoaWindow::winId() const
void QCocoaWindow::setParent(const QPlatformWindow *parentWindow)
{
// recreate the window for compatibility
bool unhideAfterRecreate = parentWindow && !m_contentViewIsToBeEmbedded && ![m_contentView isHidden];
recreateWindow(parentWindow);
if (unhideAfterRecreate)
[m_contentView setHidden:NO];
setCocoaGeometry(geometry());
}