Freshly commented code

N.C. Wilson ncw33 at cam.ac.uk
Thu Jan 3 02:56:57 UTC 2008


On Thursday 03 January 2008 1:33 am Leo Franchi wrote:
>  you definitely need to comment your code here.
> CollectionSortFilterProxyModel::lessThanString needs some doc lovin' to bo
> honest a relatively quick readthrough shows me that it would take me quite
> a significant amount of time to parse the code, so i'm going to wait for
> some comments.

Here are the comments (attached).

This is quite a nice patch for any listeners of classical music, who will 
want to be able to easily find numbered pieces of music and expect to find 
them in the 'right' place. Having Symphony 3 ... Symphony 24 ... Symphony 
104 as opposed to the standard order is a nice little feature, and it does 
not interfere with any pieces that you would not want sorted this way.

When you say it would take time to parse, if you mean time to parse regexps 
at runtime, then probably not. Most of the time the function returns 
straight away after checking the first string and will usually not even 
read the second one before passing control to the standard sort.

Nicholas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp.cpp
Type: text/x-c++src
Size: 2435 bytes
Desc: tmp.cpp
URL: <http://mail.kde.org/pipermail/amarok/attachments/20080103/5bb5b2b4/attachment.cpp>


More information about the Amarok mailing list