summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-11-23 15:24:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-29 09:28:43 +0100
commitd315e012184a2b71b7b5e41869d166c05093d13d (patch)
treeeef06bdd093861b8e0e394021ba398a0cf83294d /src/widgets/dialogs
parentd78bd439dcb290e4318734693d418937b0bf8129 (diff)
Add the Qt::ItemNeverHasChildren flag and use it in QTreeView.
It can be used to determine whether expand() should really expand. Change-Id: If79d8c295a4ca1356e60051682b227524a065126 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 4d3c7a24ec..251af273b9 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -964,6 +964,8 @@ Qt::ItemFlags QFileSystemModel::flags(const QModelIndex &index) const
flags |= Qt::ItemIsEditable;
if (indexNode->isDir())
flags |= Qt::ItemIsDropEnabled;
+ else
+ flags |= Qt::ItemNeverHasChildren;
}
return flags;
}