From a908a2d25c920d685a6d7a4793bd2ff465137745 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 4 Oct 2016 13:48:45 +0200 Subject: texteditor: fix selectedNameFilter usage texteditor.qml:165 Invalid property assignment: "selectedNameFilter" is a read-only property Change-Id: I691142ea0d3ed62a4041fb13916c251446ccea0d Reviewed-by: Mitch Curtis --- examples/quickcontrols2/texteditor/qml/texteditor.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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) } -- cgit v1.2.3