Review Request 112561: Ensure that the items are sorted correctly when the refreshItems() signal is received

Commit Hook null at kde.org
Mon Sep 9 20:42:17 BST 2013


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


This review has been submitted with commit be391bdac1901ef6a959c9d4e795b76be9c2b49d by Frank Reininghaus to branch KDE/4.11.

- Commit Hook


On Sept. 6, 2013, 3:29 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112561/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2013, 3:29 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Description
> -------
> 
> A side-effect of https://git.reviewboard.kde.org/r/111146/ is that the model is sometimes not sorted correctly after a refreshItems() signal has been received:
> 
> 1. mkdir test && cd test && touch a b c && dolphin .
> 2. Sort by size -> the order of the items is "a b c" because the name is used as a fallback (all files have zero size).
> 3. Rename "a" -> "d", either using non-inline renaming or in another view (such that the model receives the refreshItems() signal).
> 4. Note that the items are not resorted.
> 
> This patch fixes the problem. I've factored out some code that was added in https://git.reviewboard.kde.org/r/111721/ to a new function, such that both setData() and slotRefreshItems() can make use of it.
> 
> I added a unit test for the bug and another one for the grouping problem that Emmanuel found in the first version of https://git.reviewboard.kde.org/r/111721/
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kfileitemmodel.h 5917e68 
>   dolphin/src/kitemviews/kfileitemmodel.cpp 7bbc1d1 
>   dolphin/src/tests/kfileitemmodeltest.cpp f843978 
> 
> Diff: http://git.reviewboard.kde.org/r/112561/diff/
> 
> 
> Testing
> -------
> 
> Works. Old and new unit tests pass.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130909/eea2680f/attachment.htm>


More information about the kfm-devel mailing list