Review Request 114459: Update filtered items when the "refreshItems" signal is received
Frank Reininghaus
frank78ac at googlemail.com
Sat Dec 14 18:20:57 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114459/
-----------------------------------------------------------
Review request for Dolphin.
Repository: kde-baseapps
Description
-------
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.
Diffs
-----
dolphin/src/kitemviews/kfileitemmodel.cpp 739384b
dolphin/src/tests/kfileitemmodeltest.cpp ede9a3d
Diff: http://git.reviewboard.kde.org/r/114459/diff/
Testing
-------
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.
Thanks,
Frank Reininghaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20131214/68281b61/attachment.htm>
More information about the kfm-devel
mailing list