summaryrefslogtreecommitdiff
path: root/src/dialogs/DefaultFontDialog.qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2014-02-03 06:49:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-03 12:18:36 +0100
commita1df3e8537b7474db08e81bd1f0faebb13caebf4 (patch)
tree882c6215ccad563f05024c197100679733455021 /src/dialogs/DefaultFontDialog.qml
parent0bbb32469adb3c49b110e2eb987caba58da80554 (diff)
downloadqtquickcontrols-a1df3e8537b7474db08e81bd1f0faebb13caebf4.tar.gz
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/DefaultFontDialog.qml')
-rw-r--r--src/dialogs/DefaultFontDialog.qml3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dialogs/DefaultFontDialog.qml b/src/dialogs/DefaultFontDialog.qml
index b2e4764d..a0e00f15 100644
--- a/src/dialogs/DefaultFontDialog.qml
+++ b/src/dialogs/DefaultFontDialog.qml
@@ -49,6 +49,7 @@ AbstractFontDialog {
id: root
property alias font: content.externalFont
+ property alias currentFont: content.font
Rectangle {
id: content
@@ -73,8 +74,6 @@ AbstractFontDialog {
property string writingSystemSample
property var pointSizes
- onFontChanged: externalFont = font
-
onExternalFontChanged: {
if (content.font != content.externalFont) {
font = externalFont