diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-23 12:04:01 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-14 21:49:33 +0100 |
commit | 56c4ddfdf62ff6b71ce3df680bdaca01012e13f4 (patch) | |
tree | 5777f621303392efa9852f982e52a09a9e44e7e0 /src/widgets/dialogs/qfontdialog_p.h | |
parent | f86007175d7d9d592e9cf6499704ad4f17944ce4 (diff) |
QPlatformDialogHelpers: Reduce dependency on QDialog.
For each QDialog-derived class, introduce a Q[X]Options class
containing the options of the dialog. An instance is shared
between the QDialog (or dialog desktop component) and the
helper.
Change-Id: Ibabf508a4b9eaea25615638a47a4c1b8f93c019e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/widgets/dialogs/qfontdialog_p.h')
-rw-r--r-- | src/widgets/dialogs/qfontdialog_p.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfontdialog_p.h b/src/widgets/dialogs/qfontdialog_p.h index ef4e933624..8762ef2b07 100644 --- a/src/widgets/dialogs/qfontdialog_p.h +++ b/src/widgets/dialogs/qfontdialog_p.h @@ -58,6 +58,7 @@ #include "qfontdatabase.h" #include "qfontdialog.h" #include "qplatformdialoghelper_qpa.h" +#include "qsharedpointer.h" #ifndef QT_NO_FONTDIALOG @@ -78,7 +79,7 @@ class QFontDialogPrivate : public QDialogPrivate public: inline QFontDialogPrivate() - : writingSystem(QFontDatabase::Any) + : writingSystem(QFontDatabase::Any), options(new QFontDialogOptions) { } QPlatformFontDialogHelper *platformFontDialogHelper() const @@ -138,7 +139,7 @@ public: int size; bool smoothScalable; QFont selectedFont; - QFontDialog::FontDialogOptions opts; + QSharedPointer<QFontDialogOptions> options; QPointer<QObject> receiverToDisconnectOnClose; QByteArray memberToDisconnectOnClose; @@ -163,6 +164,7 @@ public: private: virtual void initHelper(QPlatformDialogHelper *); + virtual void helperPrepareShow(QPlatformDialogHelper *); }; #endif // QT_NO_FONTDIALOG |