summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfontdialog_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/qfontdialog_mac.mm')
-rw-r--r--src/gui/dialogs/qfontdialog_mac.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm
index 0c467cd..31bab2b 100644
--- a/src/gui/dialogs/qfontdialog_mac.mm
+++ b/src/gui/dialogs/qfontdialog_mac.mm
@@ -394,7 +394,9 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont)
}
[mFontPanel setDelegate:nil];
[[NSFontManager sharedFontManager] setDelegate:nil];
+#ifdef QT_MAC_USE_COCOA
[[NSFontManager sharedFontManager] setTarget:nil];
+#endif
}
@end
@@ -518,7 +520,9 @@ void *QFontDialogPrivate::openCocoaFontPanel(const QFont &initial,
extraHeight:dialogExtraHeight];
[ourPanel setDelegate:delegate];
[[NSFontManager sharedFontManager] setDelegate:delegate];
+#ifdef QT_MAC_USE_COCOA
[[NSFontManager sharedFontManager] setTarget:delegate];
+#endif
setFont(delegate, initial);
// hack to get correct initial layout