diff options
| author | Liang Qi <liang.qi@digia.com> | 2014-02-03 06:49:28 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-03 12:18:36 +0100 |
| commit | a1df3e8537b7474db08e81bd1f0faebb13caebf4 (patch) | |
| tree | 882c6215ccad563f05024c197100679733455021 /src/dialogs/qquickfontdialog.cpp | |
| parent | 0bbb32469adb3c49b110e2eb987caba58da80554 (diff) | |
Add currentFont property to FontDialog.
QFontDialog has this property. This patch effectively means that
the font property will be set when the dialog closes, instead of
whenever the current font in the dialog changes, so pressing cancel
will revert the font to what it was before the dialog was opened.
Align with e73d503b84be12e7bf28491356b459ca309e7c95 in qtdelarative,
the similar change for color dialog.
[ChangeLog][QtQuickControls][FontDialog] Added currentFont property.
Task-number: QTBUG-36574
Change-Id: I4140966543a677d8e654dbaac170a2fe8d3579a1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src/dialogs/qquickfontdialog.cpp')
| -rw-r--r-- | src/dialogs/qquickfontdialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dialogs/qquickfontdialog.cpp b/src/dialogs/qquickfontdialog.cpp index 2f3c6d83b..d17ce986e 100644 --- a/src/dialogs/qquickfontdialog.cpp +++ b/src/dialogs/qquickfontdialog.cpp @@ -117,4 +117,10 @@ QQuickFontDialog::~QQuickFontDialog() \l Window or an \l Item. */ +void QQuickFontDialog::accept() +{ + setFont(m_currentFont); + QQuickAbstractFontDialog::accept(); +} + QT_END_NAMESPACE |
