summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
index 33b102f3eb..8c0af97a68 100644
--- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
@@ -108,8 +108,6 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
[mFontPanel setRestorable:NO];
[mFontPanel setDelegate:self];
- [NSFontManager sharedFontManager].target = self; // Action is changeFont:
-
[mFontPanel retain];
}
return self;
@@ -119,7 +117,6 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
{
[mStolenContentView release];
[mFontPanel setDelegate:nil];
- [NSFontManager sharedFontManager].target = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
@@ -224,6 +221,13 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSFontPanelDelegate);
return (mResultCode == NSModalResponseOK);
}
+// Future proofing in case _NSTargetForSendAction checks this
+// property before sending us the changeFont: message.
+- (BOOL)worksWhenModal
+{
+ return YES;
+}
+
- (QPlatformDialogHelper::DialogCode)dialogResultCode
{
return (mResultCode == NSModalResponseOK) ? QPlatformDialogHelper::Accepted : QPlatformDialogHelper::Rejected;