Bug 311912 - After erasing a "filter", some thumbnails randomly disappear
Summary: After erasing a "filter", some thumbnails randomly disappear
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: bars: filter (show other bugs)
Version: 2.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 22:57 UTC by Mahendra Tallur
Modified: 2013-02-27 13:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mahendra Tallur 2012-12-18 22:57:30 UTC
When typing any query in the "filter bar", then erasing it, in a directory that displays some thumbnails (video, pictures etc.), some thumbnails are replaced by the default filetype icon. 

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin with a directory containing some thumbnails
2. Display the filter bar
3. Type anything in the filter bar
4. Delete the filter
Actual Results:  
Some of the thumbs are replaced by the default filetype icon.

Expected Results:  
The thumbs which arevisible before typing the filter should be the same as what is visible after typing then removing the filter.
Comment 1 Mahendra Tallur 2012-12-18 22:58:43 UTC
Just one more remark : it doesn't affect folder icons ; only files.
Comment 2 Emmanuel Pescosta 2012-12-20 22:27:31 UTC
Thanks for the bug report.

I can reproduce this bug in Dolphin 2.1.95 / KDE 4.9.95

This bug also appears sometimes while browsing folders with "preview enabled"
Comment 3 Kai Uwe Broulik 2013-01-06 19:59:09 UTC
Default file type icon? You mean the unknown file, ie. the question mark symbol?
I could reproduce it also using:

1. Enter something in the filter bar such as "pdf"
2. Press F5 to refresh the folder
3. Now clear the filter bar
4. Scroll down 
Many files get the unknown/generic icon but not all of them. The PDF files that were shown already keep their thumbnails, as well as some images but I could see no pattern which files keep their previews and/or icons and which don't
Comment 4 Emmanuel Pescosta 2013-02-21 22:26:38 UTC
Hello Mahendra and Kai, I think this patch https://git.reviewboard.kde.org/r/109045/ will solve the problem ;) 

@Mahendra, @Kai:
Can you please test it? Thanks
Comment 5 Emmanuel Pescosta 2013-02-27 13:04:09 UTC
Git commit 8008bc233d8447794df6f4cdc8c3f0ee7e8ac628 by Emmanuel Pescosta.
Committed on 27/02/2013 at 13:35.
Pushed by emmanuelp into branch 'master'.

Big Thanks to Frank Reininghaus, who helped me a lot with these
changes! :)

* Fixed the "Network browser" and "timeline" issues, by using the
KDirLister's itemsAdded(KUrl,KFileItemList) signal -> Use the
given Url to define the parent-child relationship.

* Changed the name of the slot "slotNewItems" to "slotItemsAdded"
for consistency with the signal.

* Use a QHash<KFileItem, ItemData*> instead of a QSet<KFileItem> to
store the filtered data (needed to keep the O(1) lookup for filtered
KFileItems in slotItemsDeleted + needed to fix bug 311912 "After
erasing a filter, some thumbnails randomly disappear")

* Made the determination of the "expandedParentsCount" slightly
simpler - just adding 1 to the parent's level (Also needed to fix the
"Network browser" and "timeline" issues)

FIXED-IN: 4.11.0
REVIEW: 109180
Related: bug 304565, bug 312890, bug 315593

M  +69   -64   dolphin/src/kitemviews/kfileitemmodel.cpp
M  +13   -8    dolphin/src/kitemviews/kfileitemmodel.h
M  +9    -3    dolphin/src/tests/kfileitemmodelbenchmark.cpp
M  +1    -1    dolphin/src/tests/kfileitemmodeltest.cpp

http://commits.kde.org/kde-baseapps/8008bc233d8447794df6f4cdc8c3f0ee7e8ac628