Review Request 112561: Ensure that the items are sorted correctly when the refreshItems() signal is received
Emmanuel Pescosta
emmanuelpescosta099 at gmail.com
Sat Sep 7 17:35:45 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112561/#review39537
-----------------------------------------------------------
Ship it!
Greate code in emitItemsChangedAndTriggerResorting(), easy to understand. Thanks! :)
- Emmanuel Pescosta
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/20130907/a86f424f/attachment.htm>
More information about the kfm-devel
mailing list