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. > - The one Qt5 has now, it's in QFileSystemModel So it's easy to move the code around. > - 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? QCollator is meant to be made public. It wasn't yet because of the pending discussions on ICU. > - In the code we have in KStringHandler we can find this comment: > // This is based on the natural sort order code code by Martin Pool > // http://sourcefrog.net/projects/natsort/ > // Martin Pool agreed to license this under LGPL or GPL. > > I don't feel very comfortable with moving this code over to the Qt project. For good reason: you can't. You need to take the one on QFSM and adapt it, or write everything anew. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel