[SailfishDevel] [solved] Re: Is Qt on Sailfish OS using ICU?

Buschmann buschmann at huessenbergnetz.de
Sat Oct 29 15:41:20 UTC 2016


Arrrrrgh. Solved it. Problem was sitting between screen and chair-back.
I had nothing to do with string comparison but with the sequence and too
early returning of my QSortFilterProxyModel::lessThan() implementation.

Buschmann

Am 29.10.2016 um 13:46 schrieb Buschmann:
> Hello list,
>
> I run into a problem when trying to sort a list of strings locale aware.
> When using QString::localeAwareCompare(), it seems only to use the
> system locale, not the locale I set as default (QLocale::setDefault())
> on application startup. As I read, this is the normal behavior when
> using the localeAwareCompare() function of QString. Since Qt 5.2 there
> is QCollator and QString uses it for comparing two string if QT_USE_ICU
> is defined on building Qt. [1]
>
> The "funny" thing for me is, that I compare two string roles in a row.
> This first strings are compared as expected, the second strings not.
>
> So, my question is now, as in the subject, if Qt on Sailfish is compiled
> to use ICU (so using QCollator) or if it uses ucstrcmp. At least
> libicu52 seems to be installed.
>
> Best greetings
> Matthias Fehring
>
> [1]
> http://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/tools/qstring.cpp?h=old/5.2#n5173
>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org

-- 
Das Gesetz hat zum Schneckengang verdorben, was Adlerflug geworden wäre.
(Friedrich Schiller - Die Räuber)

www.buschmann23.de
GPG-Key: 3A70A936614C3258
GPG Fingerprint: D786 DDF8 4CA9 00BC CDE0 9A5F CCC5 125D 6E87 D4FC


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20161029/5fa29dcb/attachment.sig>


More information about the Devel mailing list