[SailfishDevel] Is Qt on Sailfish OS using ICU?

Buschmann buschmann at huessenbergnetz.de
Sat Oct 29 11:46:18 UTC 2016

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


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

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/619f0f4b/attachment.sig>

More information about the Devel mailing list