summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfontdialog.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-03-03 14:30:46 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-03-05 14:17:50 (GMT)
commit0e9bd62d905db6e0015a58609a747bb22521f8cc (patch)
tree11e9c19dce5cecc38bf8f7b12323622e0302ac52 /src/gui/dialogs/qfontdialog.cpp
parent0dfb7598e4659dc912c2b3ace7dfdb93f953f83c (diff)
downloadQt-0e9bd62d905db6e0015a58609a747bb22521f8cc.zip
Qt-0e9bd62d905db6e0015a58609a747bb22521f8cc.tar.gz
Qt-0e9bd62d905db6e0015a58609a747bb22521f8cc.tar.bz2
Mac: non-modal native qfontdialog does not work at all
This was never implemented, and as it stands, just creating a QFontDialog and calling show on it will not show anything. This patch makes sure that show works, and that one can have more than one font dialog showing at the same time (but only the first one will be native) Reviewed-by: cduclos
Diffstat (limited to 'src/gui/dialogs/qfontdialog.cpp')
-rw-r--r--src/gui/dialogs/qfontdialog.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp
index 8e17830..b159fa7 100644
--- a/src/gui/dialogs/qfontdialog.cpp
+++ b/src/gui/dialogs/qfontdialog.cpp
@@ -174,6 +174,11 @@ void QFontDialogPrivate::init()
{
Q_Q(QFontDialog);
+#ifdef Q_WS_MAC
+ nativeDialogInUse = false;
+ delegate = 0;
+#endif
+
q->setSizeGripEnabled(true);
q->setWindowTitle(QFontDialog::tr("Select Font"));
@@ -329,10 +334,6 @@ void QFontDialogPrivate::init()
familyList->setFocus();
retranslateStrings();
-
-#ifdef Q_WS_MAC
- delegate = 0;
-#endif
}
/*!
@@ -345,8 +346,7 @@ QFontDialog::~QFontDialog()
#ifdef Q_WS_MAC
Q_D(QFontDialog);
if (d->delegate) {
- QFontDialogPrivate::closeCocoaFontPanel(d->delegate);
- QFontDialogPrivate::sharedFontPanelAvailable = true;
+ d->closeCocoaFontPanel();
return;
}
#endif