summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Reininghaus <frank78ac@googlemail.com>2012-05-26 14:29:51 (GMT)
committerFrank Reininghaus <frank78ac@googlemail.com>2012-05-26 14:29:51 (GMT)
commit288473a96cdd8888f7fc91d0a551d6cbde5fd5dc (patch)
tree157e0900463e9191182c780d1a590e80efc675da
parent98f63a671d0b8b76d69c7d4b5fc06c5837408672 (diff)
Show all items in the directory when the name filter is cleared
The problem was the following: While a QMutableSetIterator iterates the items in the QSet m_filteredItems, all items that match the new filter are removed from the set. However, to ensure that the iterator still reaches all items in the set, one must not use QSet::remove(), but rather the iterator's remove() method (see QMutableSetIterator docs). BUG: 300504 FIXED-IN: 4.8.4
-rw-r--r--dolphin/src/kitemviews/kfileitemmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dolphin/src/kitemviews/kfileitemmodel.cpp b/dolphin/src/kitemviews/kfileitemmodel.cpp
index 4aed5e2..6abb121 100644
--- a/dolphin/src/kitemviews/kfileitemmodel.cpp
+++ b/dolphin/src/kitemviews/kfileitemmodel.cpp
@@ -546,7 +546,7 @@ void KFileItemModel::setNameFilter(const QString& nameFilter)
const KFileItem item = it.next();
if (m_filter.matches(item)) {
newVisibleItems.append(item);
- m_filteredItems.remove(item);
+ it.remove();
}
}