Otherwise they might be still events sent to view with no
proper QWindow. Also, add dealloc QNSView for clean up.
Task-number: QTBUG-26580
Task-number: QTBUG-27456
Change-Id: Icdbe5c39490b72ec82795c2d71e5671cea81921e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
void QCocoaWindow::clearNSWindow(NSWindow *window)
{
+ [window setContentView:nil];
[window setDelegate:nil];
[window clearPlatformWindow];
[[NSNotificationCenter defaultCenter] removeObserver:m_contentView];
return self;
}
+- (void)dealloc
+{
+ CGImageRelease(m_cgImage);
+ m_cgImage = 0;
+ m_window = 0;
+ [super dealloc];
+}
+
- (id)initWithQWindow:(QWindow *)window platformWindow:(QCocoaWindow *) platformWindow
{
self = [self init];