<div dir="ltr">On Fri, Jul 19, 2013 at 1:17 PM, Aleix Pol <span dir="ltr"><<a href="mailto:aleixpol@kde.org" target="_blank">aleixpol@kde.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Hi,<div>I was looking at that task in the Qt5 epics list and I didn't understand it fully.</div><div><br></div><div>contribute natural-comparison to Qt5 (see KStringHandler). In Qt there is naturalCompare function but private and not as good as from KStringHandler. Thiago says: add the feature to QCollator.<br>
</div><div><br></div><div>Here's the problems I see:</div><div>- I don't know what's the goal of the task, so it's hard for me to decide what to do.</div><div>- The one Qt5 has now, it's in QFileSystemModel</div>
<div>- QCollator is also a private class, do we need to have it available from the public API? I guess the only use of it is in any tier1 module. If so, why QCollator?</div><div>- In the code we have in KStringHandler we can find this comment:</div>
<div><div>// This is based on the natural sort order code code by Martin Pool</div><div>// <a href="http://sourcefrog.net/projects/natsort/" target="_blank">http://sourcefrog.net/projects/natsort/</a></div><div>// Martin Pool agreed to license this under LGPL or GPL.</div>
</div><div><br></div><div>I don't feel very comfortable with moving this code over to the Qt project.</div><span class=""><font color="#888888"><div><br></div><div>Aleix</div></font></span></div></blockquote><div><br>
</div><div>Hi,</div><div>So after talking a bit with wojtask9.</div><div><br></div><div>Apparently the thing is that our itemviews module needs KStringHandler::naturalCompare, and we want it to be tier1 (thus can't depend on KCoreAddons).<br>
</div><div><br></div><div>Additionally, he showed me this review [1] that suggests moving QCollator to public API. This solves the 3rd point. I guess that then we can add a public naturalCompare function in QCollator for easy natural comparison.</div>
<div><br></div><div>For the moment, I'll update the explanation and release the task since there's little we can do with a private QCollator.</div><div><br></div><div>Aleix</div></div><br></div><div class="gmail_extra">
[1] <a href="https://codereview.qt-project.org/#change,50372">https://codereview.qt-project.org/#change,50372</a><br></div></div>