summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-04-16 12:14:35 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-17 03:28:29 +0200
commit5a57ddebf5033e6c60ac34adf81a21a6a18ad7e6 (patch)
treeed500a78aae9693d2da9b1f80179d2e1582ef443 /src/plugins/platforms/cocoa
parenta2e42a6a0a94f8c617a757a7c5661f59f3166e7d (diff)
Fix tst_QDialog::deleteInExec() crash on Mac OS X
When destroying a window immediately after showing it, we can sometimes provoke a crash in Cocoa after the show-window-animation has finished (which appears to assume that the window's view will always be valid). Prevent the crash by not removing the view from the window. When recreating a window, we explicitly release the old window, but we do not release the view, so we can freely add it to the new window (i.e. this does not introduce new bugs related to recreating the platform window). Task-number: QTBUG-24977 Change-Id: I466ce75b04785401032a0a2d4a2c494910cd1672 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index de58842772..af8f039d94 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -479,7 +479,6 @@ void QCocoaWindow::clearNSWindow(NSWindow *window)
{
[window setDelegate:nil];
[[NSNotificationCenter defaultCenter] removeObserver:m_contentView];
- [m_contentView removeFromSuperviewWithoutNeedingDisplay];
}
// Returns the current global screen geometry for the nswindow associated with this window.