When I open a folder with many files, open the filter bar ("Strg + I"), type in any text and immediately close the filter bar using the close button next to it, then dolphin sometimes (or always?) doesn't show all files inside this folder. File operations selecting all files with "Strg + A" or drag & drop are performed on the visible sub-set of files. In order to view all files again, I have to hit the refresh button. Reproducible: Sometimes Steps to Reproduce: 1. Open a folder with many files (i.e. my home folder containing 174 folders and 135 files). 2. Hit "Strg + A" to see the number of files in the status bar (i.e. my home folder shows 174 folders and 135 files). 3. Open the filter bar and type in any text (i.e. "foo"). 4. Hit the close button next to the filter bar. 5. Hit "Strg + A" to see the number of files in the status bar (i.e. my home folder now shows 139 folders and 111 files). Actual Results: In the described test case my home folder shew 139 folders and 111 files. Expected Results: My home folder should have shown 174 folders and 135 files.
Thanks for the report. Could you please let us know your exact KDE version? If possible it would be great if you could attach a minimal zipped directory where this issue is reproducible for you, as currently I'm not able to reproduce the issue with the steps above.
Hi Peter, I can confirm this in 4.8.3. Happens every time in any folder with about 20+ items. http://youtu.be/D3J1Jxpp9q0
I'm also running KDE 4.8.3 (from openSUSE Tumbleweed). Unfortunately, the issue doesn't appear in every case. I created a directory containing 36 empty files (0-9, a-z) and experienced the issue. Then I deleted the directory and created it again (after a while) with the same files, but this time, I didn't encounter the issue. I created even more files and folders (88 items in total), but the issue is still not present. However, other large directories, even a small one with only 20 items, show this issue.
@Gedgon: Thanks for this good hint - I can reproduce this issue reliable with one directory on 4.8.3 + master; I'll try to come up with a fix until 4.9.0
Git commit 288473a96cdd8888f7fc91d0a551d6cbde5fd5dc by Frank Reininghaus. Committed on 26/05/2012 at 16:29. Pushed by freininghaus into branch 'KDE/4.8'. 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). FIXED-IN: 4.8.4 M +1 -1 dolphin/src/kitemviews/kfileitemmodel.cpp http://commits.kde.org/kde-baseapps/288473a96cdd8888f7fc91d0a551d6cbde5fd5dc
Git commit 6b15e2722195800f87daacd9e09fa8daa5315f3e by Frank Reininghaus. Committed on 26/05/2012 at 16:29. Pushed by freininghaus into branch 'master'. 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). (cherry picked from commit 288473a96cdd8888f7fc91d0a551d6cbde5fd5dc) M +1 -1 dolphin/src/kitemviews/kfileitemmodel.cpp http://commits.kde.org/kde-baseapps/6b15e2722195800f87daacd9e09fa8daa5315f3e
> I'll try to come up with a fix until 4.9.0 Frank was a lot faster than me ;-) Thanks Frank!