Update filtered items when the "refreshItems" signal is received

Review Request #114459 - Created Dec. 14, 2013 and submitted

Information
Frank Reininghaus
kde-baseapps
KDE/4.12
Reviewers
dolphin
KDirLister tells us about changed files via its "refreshItems" signal. We do update the files in the view in KFileItemModel::slotRefreshItems(), but we do not check if filtered items might need to be updated as well.

To see this:

1. In an empty directory, create two test files with "touch a.txt b.jpg"
2. Open the directory in Dolphin, and split the view.
3. In one of the views, press Ctrl+I and enter the filter text "txt" -> b.jpg disappears.
4. In the other view, rename "b.jpg" to "c.jpg".
5. Clear the filter -> the view still shows a.txt and b.jpg.
The patch fixes the problem for me. Old and new unit tests pass.

Note that there is still another problem left: if the renamed filtered file matches the filter, it should be shown in the view, and if a file does not match the filter any more after renaming it, it should be filtered.
Emmanuel Pescosta
Commit Hook
This review has been submitted with commit c0a851893ecfc48a9ec7d475d0f7b8213514f9c3 by Frank Reininghaus to branch KDE/4.12.
Frank Reininghaus
Review request changed

Status: Closed (submitted)

Loading...