From 2f51debbea28973c6c9117a0aae806d41f83b03b Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Wed, 22 May 2013 18:14:21 +0200 Subject: Do not reset the 'isExpanded' state when an expanded folder is refreshed If an item is moved out of an expanded folder, the model receives the dir lister's refreshItems signal for the folder. The method retrieveData() then updates the folder's properties. This commit makes sure that the 'isExpanded' state is not touched by retrieveData(). A side-effect is that the 'isExpanded' role is not initialized to 'false', but this does not matter because trying to read a non-existing role from the QHash yields a default-constructed QVariant, which evaluates to 'false'. BUG: 299675 FIXED-IN: 4.10.4 REVIEW: 110401 --- src/kitemviews/kfileitemmodel.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/kitemviews/kfileitemmodel.cpp') diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 7ba78a436..c78fdc358 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1333,10 +1333,6 @@ QHash 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()); } -- cgit v1.3