Review Request 114459: Update filtered items when the "refreshItems" signal is received

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Sat Dec 21 12:21:29 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114459/#review45987
-----------------------------------------------------------

Ship it!


Good catch! 

Unit tests pass, looks good.

- Emmanuel Pescosta


On Dec. 14, 2013, 7:20 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114459/
> -----------------------------------------------------------
> 
> (Updated Dec. 14, 2013, 7:20 p.m.)
> 
> 
> 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/20131221/ba8d59b0/attachment.htm>


More information about the kfm-devel mailing list