Cococa: Make QMacNativeWidget work again.

The NSWindow releasing code in recreateWindow() has
regressed to not handle the m_contentViewIsToBeEmbedded
case.

Release the NSWindow directly instead of calling
recreateWindow()

Change-Id: Ibc6d10faf4c6dae42e02c400b16f28a1d28eb192
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Morten Johan Sørvig 2014-03-14 11:33:07 +01:00 committed by The Qt Project
parent ecd70c038a
commit 91d0ba8ff4

View File

@ -1113,7 +1113,9 @@ NSWindow *QCocoaWindow::nativeWindow() const
void QCocoaWindow::setEmbeddedInForeignView(bool embedded)
{
m_contentViewIsToBeEmbedded = embedded;
recreateWindow(0); // destroy what was already created
// Release any previosly created NSWindow.
[m_nsWindow closeAndRelease];
m_nsWindow = 0;
}
void QCocoaWindow::windowWillMove()