diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-02 14:30:59 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-03-18 09:21:21 +0000 |
commit | 96bc218b36f9732544ae59ccbba834230f3e6ea0 (patch) | |
tree | 4cb5c40c3c977e4157b71e281fb073619717d41f /src/dialogs/DefaultFileDialog.qml | |
parent | bb95b8e3eb464d26ab3e78b49c8276277c929470 (diff) | |
download | qtquickcontrols-96bc218b36f9732544ae59ccbba834230f3e6ea0.tar.gz |
Dialogs: let folder be assignable in DefaultFileDialog.qml
The current code creates an explicit binding of property
'folder' to its folder list model. The result is that if
the app sets folder to something else, it would be overwritten
by the binding already upon creation.
This patch will keep the binding, but assign it to the property
directly. That way the app can override its initial value.
Note that since the app cannot manipulate the model directly, and
since functions like dirUp(), dirDown(), click in tableview etc, updates
'folder' directly, the binding seems to be unnecessary in the
first place.
Change-Id: I65e900df9f9305e8bbec4ac401062243d83740aa
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/dialogs/DefaultFileDialog.qml')
-rw-r--r-- | src/dialogs/DefaultFileDialog.qml | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml index 0bc59893..db4d74bf 100644 --- a/src/dialogs/DefaultFileDialog.qml +++ b/src/dialogs/DefaultFileDialog.qml @@ -47,6 +47,9 @@ import "qml" AbstractFileDialog { id: root + + folder: view.model.folder + onVisibleChanged: { if (visible) { view.needsWidthAdjustment = true @@ -59,7 +62,6 @@ AbstractFileDialog { view.model.nameFilters = root.selectedNameFilterExtensions filterField.currentIndex = root.selectedNameFilterIndex root.favoriteFolders = settings.favoriteFolders - root.folder = view.model.folder } Component.onDestruction: { @@ -122,11 +124,6 @@ AbstractFileDialog { color: root.palette.window Binding { - target: root - property: "folder" - value: view.model.folder - } - Binding { target: view.model property: "folder" value: root.folder |