┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
-rw-r--r--src/kitemviews/kfileitemmodel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp
index 23afb087a..6391d7d3f 100644
--- a/src/kitemviews/kfileitemmodel.cpp
+++ b/src/kitemviews/kfileitemmodel.cpp
@@ -15,6 +15,7 @@
#include <KDirLister>
#include <KIO/Job>
+#include <KIO/kio_version.h>
#include <KLocalizedString>
#include <KLazyLocalizedString>
#include <KUrlMimeData>
@@ -575,6 +576,9 @@ bool KFileItemModel::setExpanded(int index, bool expanded)
m_expandedDirs.remove(targetUrl);
m_dirLister->stop(url);
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 92, 0)
+ m_dirLister->forgetDirs(url);
+#endif
const int parentLevel = expandedParentsCount(index);
const int itemCount = m_itemData.count();
@@ -590,6 +594,9 @@ bool KFileItemModel::setExpanded(int index, bool expanded)
const QUrl url = itemData->item.url();
m_expandedDirs.remove(targetUrl);
m_dirLister->stop(url); // TODO: try to unit-test this, see https://bugs.kde.org/show_bug.cgi?id=332102#c11
+#if KIO_VERSION >= QT_VERSION_CHECK(5, 92, 0)
+ m_dirLister->forgetDirs(url);
+#endif
expandedChildren.append(targetUrl);
}
++childIndex;