naturalCompare Qt5 task
Frank Reininghaus
frank78ac at googlemail.com
Fri Jul 19 14:17:52 UTC 2013
Hi,
2013/7/19 Thiago Macieira:
> On sexta-feira, 19 de julho de 2013, às 13.17.26, you wrote:
>> Hi,
>> I was looking at that task in the Qt5 epics list and I didn't understand it
>> fully.
>>
>> 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.
>>
>> Here's the problems I see:
>> - I don't know what's the goal of the task, so it's hard for me to decide
>> what to do.
>
> QCollator does locale-based sorting ("collating") in a much more efficient way
> than element-by-element QString::localeAwareCompare can do.
>
> The task is to add a set of methods to QCollator to do *natural* locale-based
> comparison.
But I thought that natural locale-based comparison is just what
QCollator does if its "numericMode" is enabled?
http://qt.gitorious.org/qt/qtbase/blobs/v5.1.0/src/corelib/tools/qcollator.cpp#line401
Regards,
Frank
More information about the Kde-frameworks-devel
mailing list