iOS: remove the view from the view hierarchy upon destruction

We need to remove the view that backs QWindow when the window
is destroyed. Otherwise the view will still be visible on screen,
but now with a dangling QWindow pointer. This fixes a crash that
happens when closing dialogs.

Change-Id: I9053c83c6db80a39f4f71a63993cc7ae73fc4196
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
Richard Moe Gustavsen 2012-12-11 12:07:05 +01:00 committed by Tor Arne Vestbø
parent 509697adc3
commit d07bd1b22f

View File

@ -221,6 +221,7 @@ QIOSWindow::~QIOSWindow()
if (m_glData.depthRenderbuffer)
glDeleteRenderbuffers(1, &m_glData.depthRenderbuffer);
[m_view removeFromSuperview];
[m_view release];
}