┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp4
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 0289666ff..d30d9e5be 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -1327,10 +1327,6 @@ QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem& item,
data.insert("path", path);
}
- if (m_requestRole[IsExpandedRole]) {
- data.insert("isExpanded", false);
- }
-
if (m_requestRole[IsExpandableRole]) {
data.insert("isExpandable", item.isDir() && item.url() == item.targetUrl());
}
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp
index 39d01e232..7cade10f5 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.cpp
+++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp
@@ -630,6 +630,13 @@ void KFileItemModelRolesUpdater::slotDirWatchDirty(const QString& path)
if (getSizeRole || getIsExpandableRole) {
const int index = m_model->index(KUrl(path));
if (index >= 0) {
+ if (!m_model->fileItem(index).isDir()) {
+ // If INotify is used, KDirWatch issues the dirty() signal
+ // also for changed files inside the directory, even if we
+ // don't enable this behavior explicitly (see bug 309740).
+ return;
+ }
+
QHash<QByteArray, QVariant> data;
const int count = subItemsCount(path);