Cocoa: QCocoaWindow::clearNSWindow() needs to cleanup properly
authorBradley T. Hughes <bradley.hughes@nokia.com>
Fri, 23 Mar 2012 11:53:35 +0000 (12:53 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 26 Mar 2012 09:41:07 +0000 (11:41 +0200)
commita9c49816a7008cf6e181fe66d7644a64c10faf17
tree92347757c5419bec0f82da4a1e10ef15bb863881
parentd8508b813950cad79600acb49ef5bef837f04934
Cocoa: QCocoaWindow::clearNSWindow() needs to cleanup properly

clearNSWindow() should also clear the delegate and remove the
contentView from the window, since we are no longer using that window.
Make sure the QCocoaWindow::~QCocoaWindow() doesn't release the
m_contentView until after clearNSWindow(), to avoid crashes while
trying to cleanup the window and view.

Change-Id: Ia081488f629a4fd4cf10fb1053fb8183b1914d35
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/plugins/platforms/cocoa/qcocoawindow.mm