Review Request 112728: Move KItemRange to its own header, and factor out the code that transforms a sorted list of ints to a KItemRangeList
Emmanuel Pescosta
emmanuelpescosta099 at gmail.com
Mon Sep 16 09:41:05 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112728/#review40095
-----------------------------------------------------------
Ship it!
Thanks!
- Emmanuel Pescosta
On Sept. 14, 2013, 3:36 p.m., Frank Reininghaus wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112728/
> -----------------------------------------------------------
>
> (Updated Sept. 14, 2013, 3:36 p.m.)
>
>
> Review request for Dolphin.
>
>
> Description
> -------
>
> There is some code duplication in KFileItemModel: We have two different implementations for the transformation of a sorted QList<int> to a KItemRangeList.
>
> I propose to change this by factoring out this code, and moving KItemRange(List) to its own header file while we're at it. It's header-only with inline functions for simplicity and efficiency. Moreover, I made the function that takes the sorted list a template, such that one can easily replace QList by QVector, for example.
>
> Note that overriding operator<<() in KItemRangeList was necessary because it's not a typedef for QList<KItemRange>, but a class derived from that with my patch, and some code fails to compile if the return type of that function is QList<KItemRange> and not KItemRangeList.
>
>
> Diffs
> -----
>
> dolphin/src/kitemviews/kfileitemmodel.cpp 51ff142
> dolphin/src/kitemviews/kitemmodelbase.h 7545192
> dolphin/src/kitemviews/kitemmodelbase.cpp c13c9f8
> dolphin/src/kitemviews/kitemrange.h PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/112728/diff/
>
>
> Testing
> -------
>
> Unit tests pass.
>
>
> Thanks,
>
> Frank Reininghaus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130916/5edfeb1c/attachment.htm>
More information about the kfm-devel
mailing list