diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-08-11 20:53:30 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-08-12 07:56:03 +0000 |
commit | 0d8e87d7f6765fec9f261030d63768d49cd7c6de (patch) | |
tree | 37c1135a066c939b4b5fa172754fd42d5b2dfbc6 /examples/quickcontrols2/texteditor/qml | |
parent | 4a981527124b628fbd05f3d8d6462a2b20bb9567 (diff) |
texteditor: simplify saveAs() - let FileDialog handle the suffix
Change-Id: Id1b415ebcbe12a9eeff9b54dcfa2cec67054a8d6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols2/texteditor/qml')
-rw-r--r-- | examples/quickcontrols2/texteditor/qml/texteditor.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quickcontrols2/texteditor/qml/texteditor.qml b/examples/quickcontrols2/texteditor/qml/texteditor.qml index 1188686b..a24a174b 100644 --- a/examples/quickcontrols2/texteditor/qml/texteditor.qml +++ b/examples/quickcontrols2/texteditor/qml/texteditor.qml @@ -169,9 +169,9 @@ ApplicationWindow { FileDialog { id: saveDialog fileMode: FileDialog.SaveFile + defaultSuffix: "html" nameFilters: openDialog.nameFilters - // TODO: will eventually pass FileDialog's suffix property here - onFileSelected: document.saveAs(file, "") + onFileSelected: document.saveAs(file) } FontDialog { |