aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-10-04 13:48:45 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-10-04 12:08:30 +0000
commita908a2d25c920d685a6d7a4793bd2ff465137745 (patch)
tree40baf893b2f1e82e5da79968f4cc23e3a7bacc9d /examples
parent18f42239d4c2fa0d3eec4d74f1ff8dd4e27e2f01 (diff)
texteditor: fix selectedNameFilter usage
texteditor.qml:165 Invalid property assignment: "selectedNameFilter" is a read-only property Change-Id: I691142ea0d3ed62a4041fb13916c251446ccea0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quickcontrols2/texteditor/qml/texteditor.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quickcontrols2/texteditor/qml/texteditor.qml b/examples/quickcontrols2/texteditor/qml/texteditor.qml
index 8cc33c6d..2247e8f1 100644
--- a/examples/quickcontrols2/texteditor/qml/texteditor.qml
+++ b/examples/quickcontrols2/texteditor/qml/texteditor.qml
@@ -162,7 +162,7 @@ ApplicationWindow {
FileDialog {
id: openDialog
fileMode: FileDialog.OpenFile
- selectedNameFilter: nameFilters[1]
+ selectedNameFilter.index: 1
nameFilters: ["Text files (*.txt)", "HTML files (*.html *.htm)"]
folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
onAccepted: document.load(file)
@@ -173,7 +173,7 @@ ApplicationWindow {
fileMode: FileDialog.SaveFile
defaultSuffix: document.fileType
nameFilters: openDialog.nameFilters
- selectedNameFilter: document.fileType === "txt" ? nameFilters[0] : nameFilters[1]
+ selectedNameFilter.index: document.fileType === "txt" ? 0 : 1
folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
onAccepted: document.saveAs(file)
}