Mac: remove some unused code in QFontDialog
authorLiang Qi <liang.qi@digia.com>
Tue, 30 Oct 2012 12:46:50 +0000 (13:46 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 6 Nov 2012 19:26:43 +0000 (20:26 +0100)
Those code was warpped by Q_WS_MAC and should be part of QPA already.

Change-Id: I48b751aad0509b50ccf9e82778c962ed80a2a9f9
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
src/widgets/dialogs/qfontdialog.cpp
src/widgets/dialogs/qfontdialog_p.h

index 30004df..2a68d29 100644 (file)
@@ -333,13 +333,6 @@ void QFontDialogPrivate::init()
 
 QFontDialog::~QFontDialog()
 {
-#ifdef Q_WS_MAC
-    Q_D(QFontDialog);
-    if (d->delegate) {
-        d->closeCocoaFontPanel();
-        return;
-    }
-#endif
 }
 
 /*!
@@ -804,11 +797,6 @@ void QFontDialog::setCurrentFont(const QFont &font)
         if (QPlatformFontDialogHelper *helper = d->platformFontDialogHelper())
             helper->setCurrentFont(font);
     }
-
-#ifdef Q_WS_MAC
-    if (d->delegate)
-        QFontDialogPrivate::setFont(d->delegate, font);
-#endif
 }
 
 /*!
@@ -911,11 +899,6 @@ QFontDialog::FontDialogOptions QFontDialog::options() const
     return QFontDialog::FontDialogOptions(int(d->options->options()));
 }
 
-#ifdef Q_WS_MAC
-// can only have one Cocoa font panel active
-bool QFontDialogPrivate::sharedFontPanelAvailable = true;
-#endif
-
 /*!
     \since 4.5
     \overload
index 015a605..93d1201 100644 (file)
@@ -145,22 +145,6 @@ public:
 
     bool canBeNativeDialog() const;
     void _q_runNativeAppModalPanel();
-#ifdef Q_WS_MAC
-    static void setFont(void *delegate, const QFont &font);
-
-    inline void done(int result) { q_func()->done(result); }
-    inline QFontDialog *fontDialog() { return q_func(); }
-
-    void *delegate;
-    void closeCocoaFontPanel();
-
-    bool setVisible_sys(bool visible);
-    void createNSFontPanelDelegate();
-    bool showCocoaFontPanel();
-    bool hideCocoaFontPanel();
-
-    static bool sharedFontPanelAvailable;
-#endif
 
 private:
     virtual void initHelper(QPlatformDialogHelper *);