<div dir="ltr">On Fri, Jul 19, 2013 at 2:47 PM, John Layt <span dir="ltr"><<a href="mailto:jlayt@kde.org" target="_blank">jlayt@kde.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 19 July 2013 14:15, Aleix Pol <<a href="mailto:aleixpol@kde.org">aleixpol@kde.org</a>> wrote:<br>
> On Fri, Jul 19, 2013 at 1:17 PM, Aleix Pol <<a href="mailto:aleixpol@kde.org">aleixpol@kde.org</a>> wrote:<br>
>><br>
>> Hi,<br>
>> I was looking at that task in the Qt5 epics list and I didn't understand<br>
>> it fully.<br>
>><br>
>> contribute natural-comparison to Qt5 (see KStringHandler). In Qt there is<br>
>> naturalCompare function but private and not as good as from KStringHandler.<br>
>> Thiago says: add the feature to QCollator.<br>
>><br>
>> Here's the problems I see:<br>
>> - I don't know what's the goal of the task, so it's hard for me to decide<br>
>> what to do.<br>
>> - The one Qt5 has now, it's in QFileSystemModel<br>
>> - QCollator is also a private class, do we need to have it available from<br>
>> the public API? I guess the only use of it is in any tier1 module. If so,<br>
>> why QCollator?<br>
>> - In the code we have in KStringHandler we can find this comment:<br>
>> // This is based on the natural sort order code code by Martin Pool<br>
>> // <a href="http://sourcefrog.net/projects/natsort/" target="_blank">http://sourcefrog.net/projects/natsort/</a><br>
>> // Martin Pool agreed to license this under LGPL or GPL.<br>
>><br>
>> I don't feel very comfortable with moving this code over to the Qt<br>
>> project.<br>
>><br>
>> Aleix<br>
><br>
><br>
> Hi,<br>
> So after talking a bit with wojtask9.<br>
><br>
> Apparently the thing is that our itemviews module needs<br>
> KStringHandler::naturalCompare, and we want it to be tier1 (thus can't<br>
> depend on KCoreAddons).<br>
><br>
> Additionally, he showed me this review [1] that suggests moving QCollator to<br>
> public API. This solves the 3rd point. I guess that then we can add a public<br>
> naturalCompare function in QCollator for easy natural comparison.<br>
><br>
> For the moment, I'll update the explanation and release the task since<br>
> there's little we can do with a private QCollator.<br>
><br>
> Aleix<br>
><br>
> [1] <a href="https://codereview.qt-project.org/#change,50372" target="_blank">https://codereview.qt-project.org/#change,50372</a><br>
<br>
</div></div>It's not an area I know much about, but QCollator is still private and<br>
as far as I can see currently needs ICU to actually work. I guess<br>
that goes on my TODO list then as part of the ICU work. If we can<br>
find a Windows Win32 api that does the same thing or close enough we<br>
should be able to move it forward more quickly. Otherwise we will<br>
need our own fallback implementation.<br>
<br>
John.<br>
_______________________________________________<br>
Kde-frameworks-devel mailing list<br>
<a href="mailto:Kde-frameworks-devel@kde.org">Kde-frameworks-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-frameworks-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kde-frameworks-devel</a><br>
</blockquote></div><br></div><div class="gmail_extra">I don't know then... maybe we should move the naturalCompare from QFileSystemModel as a static QString::naturalCompare.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
Aleix</div></div>