summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-05-05 16:47:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-05 20:58:50 +0200
commit723cd96c92955fb90a02625d323ac18c62fda6be (patch)
tree41a04d495608e72c625b254b5e4a939f5b274c21
parent592ae64ee512d730d798b9342d61d15bb33dedab (diff)
downloadqtquickcontrols-723cd96c92955fb90a02625d323ac18c62fda6be.tar.gz
FileDialog: update icon whenever the filename changesv5.3.0-rc1
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 <liang.qi@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
-rw-r--r--src/dialogs/DefaultFileDialog.qml3
1 files changed, 1 insertions, 2 deletions
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