┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2018-04-01 12:23:08 +0200
committerElvis Angelaccio <[email protected]>2018-04-01 12:30:41 +0200
commit6f3b0e3d00e12c8f6d6cbc3953ee31d3c4cfa7c7 (patch)
tree38c98f52990cb41e05e220a9d45416087ceb70fc /src/panels
parent763933977b87daf3c013962879b55c9391c20e41 (diff)
Fix detaching
Diffstat (limited to 'src/panels')
-rw-r--r--src/panels/places/placesitemmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp
index 444ad29ea..371417a23 100644
--- a/src/panels/places/placesitemmodel.cpp
+++ b/src/panels/places/placesitemmodel.cpp
@@ -600,7 +600,8 @@ void PlacesItemModel::onSourceModelDataChanged(const QModelIndex &topLeft, const
void PlacesItemModel::onSourceModelGroupHiddenChanged(KFilePlacesModel::GroupType group, bool hidden)
{
- for(const QModelIndex &sourceIndex : m_sourceModel->groupIndexes(group)) {
+ const auto groupIndexes = m_sourceModel->groupIndexes(group);
+ for (const QModelIndex &sourceIndex : groupIndexes) {
PlacesItem *item = placesItem(mapFromSource(sourceIndex));
if (item) {
item->setGroupHidden(hidden);