diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-12-09 12:36:52 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-12-10 13:44:17 (GMT) |
commit | 9fd117106c4c18fc5299816ab62cdaeb574b608d (patch) | |
tree | 96aa9d9744eadcfe0e86d2ea6ccaa9cd26e3534b /src | |
parent | 970f19bdb55cd559e9ef97228d30fd52b20e39cb (diff) | |
download | Qt-9fd117106c4c18fc5299816ab62cdaeb574b608d.zip Qt-9fd117106c4c18fc5299816ab62cdaeb574b608d.tar.gz Qt-9fd117106c4c18fc5299816ab62cdaeb574b608d.tar.bz2 |
Fix crash in QFontDialog::getFont() on Mac 10.4
[NSFontManager setTarget] is not available on 10.4.
Rev-by: Richard Moe Gustavsen
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/dialogs/qfontdialog_mac.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm index dacb54c..b9f918f 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 |