diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm index a70953d0df..088f6265ca 100644 --- a/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm @@ -362,7 +362,12 @@ QCocoaFontDialogHelper::QCocoaFontDialogHelper() : } QCocoaFontDialogHelper::~QCocoaFontDialogHelper() -{ } +{ + if (!mDelegate) + return; + [reinterpret_cast<QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *>(mDelegate) release]; + mDelegate = 0; +} void QCocoaFontDialogHelper::exec() { @@ -377,14 +382,6 @@ void QCocoaFontDialogHelper::exec() emit reject(); } -void QCocoaFontDialogHelper::deleteNativeDialog() -{ - if (!mDelegate) - return; - [reinterpret_cast<QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *>(mDelegate) release]; - mDelegate = 0; -} - bool QCocoaFontDialogHelper::show(Qt::WindowFlags, Qt::WindowModality windowModality, QWindow *parent) { if (windowModality == Qt::WindowModal) { |