mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
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
This commit is contained in:
parent
98f63a671d
commit
288473a96c
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue