Bug 316335

Summary: When children of an expanded folder are filtered, the folder is collapsed, and then the filter is cleared, the children reappear
Product: [Applications] dolphin Reporter: Frank Reininghaus <frank78ac>
Component: view-engine: details modeAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal Keywords: investigated, reproducible
Priority: NOR    
Version: 2.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 4.10.2

Description Frank Reininghaus 2013-03-07 21:42:50 UTC
Related to bug 315210, which is about a similar issue that happens when deleting expanded folders with filtered children.

Reproducible: Always

Steps to Reproduce:
1. In Details View, expand a non-empty folder.
2. In the filter bar, enter something that makes the children of the expanded folder disappear.
3. Collapse the folder, e.g., by clicking the arrow next to it.
4. Clear the filter.
Actual Results:  
The children reappear. In master, we even get a crash because KFileItemModel::lessThan tries to dereference the dangling "parent" pionter of the ItemData.

Expected Results:  
The children should not reappear.
Comment 1 Frank Reininghaus 2013-03-07 21:48:34 UTC
https://git.reviewboard.kde.org/r/109343/
Comment 2 Frank Reininghaus 2013-03-10 17:27:08 UTC
Git commit acec0e6509ae99ebf08690bdef25e523d43519cd by Frank Reininghaus.
Committed on 10/03/2013 at 18:26.
Pushed by freininghaus into branch 'KDE/4.10'.

Remove filtered children if the parent folder is collapsed

This is analogous to commit e053ecdcd57cc39fdcbc314fc8dd22c8b9dbdd4f,
which fixes the same problem for the case that the parent folder is
deleted.
FIXED-IN: 4.10.2
REVIEW: 109343

M  +23   -0    dolphin/src/kitemviews/kfileitemmodel.cpp
M  +50   -0    dolphin/src/tests/kfileitemmodeltest.cpp

http://commits.kde.org/kde-baseapps/acec0e6509ae99ebf08690bdef25e523d43519cd