From f9280ba45ed6e492871cd25026a1bce7a17042dc Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 24 Oct 2016 13:49:41 -0700 Subject: QNSColorPanelDelegate: Don't restore stolen view on dealloc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We may not be playing nice with Cocoa's internals when we decide to reparent NSColorPanel's contents to add QColorDialog's own OK/Cancel buttons. In order to reduce issues, we should avoid poking at things during the application's shutdown sequence. Simply releasing the stolen view should be enough at that point. A similar pattern exists in QNSFontPanelDelegate. Change-Id: I678c236e0c57c4d08a1109a479d965f924288c54 Task-number: QTBUG-56448 Reviewed-by: Tor Arne Vestbø Reviewed-by: Timur Pocheptsov Reviewed-by: Erik Verbruggen --- src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm') diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index d1802fe4f9..5b27dc1da9 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -144,7 +144,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate); - (void)dealloc { - [self restoreOriginalContentView]; + [mStolenContentView release]; [mFontPanel setDelegate:nil]; [[NSFontManager sharedFontManager] setDelegate:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self]; -- cgit v1.2.3