From 723cd96c92955fb90a02625d323ac18c62fda6be Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 5 May 2014 16:47:03 +0200 Subject: FileDialog: update icon whenever the filename changes view.model.get(styleData.row, "fileIsDir") is unreliable for some reason, but each filename usually changes when we go into a different directory. Maybe it could still fail if you navigate from a directory containing a directory, to another directory which has a file with exactly the same name in the same position. Since most files have extensions, this is unlikely... Task-number: QTBUG-38683 Change-Id: If080c4f1a7a01b20f6c468fcb06653e3c2314a1a Reviewed-by: Liang Qi Reviewed-by: J-P Nurmi --- src/dialogs/DefaultFileDialog.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/dialogs/DefaultFileDialog.qml') diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml index af5d7b0b..7ebd443a 100644 --- a/src/dialogs/DefaultFileDialog.qml +++ b/src/dialogs/DefaultFileDialog.qml @@ -316,12 +316,11 @@ AbstractFileDialog { x: 4 height: parent.height - 2 source: "images/folder.png" - property var isDir: view.model.get(styleData.row, "fileIsDir") - visible: isDir !== undefined && isDir } Text { id: pathText text: styleData.value + onTextChanged: fileIcon.visible = view.model.isFolder(styleData.row) anchors { left: parent.left right: parent.right -- cgit v1.2.1