Il 11/05/20 10:23, Hamish Moffatt ha scritto:
Q_GLOBAL_STATIC(QThreadStorage, defaultCollator)
Why does it need an instance per thread?
Because QCollator is reentrant, not thread-safe.
HTH,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDA
On 9/5/20 12:35 am, Thiago Macieira wrote:
On Friday, 8 May 2020 05:05:43 PDT Hamish Moffatt wrote:
localeAwareCompare() is working as expected.
Unfortunately, it doesn't allow the case sensitivity to be specified
(unlike QCollator::compare() and QString::compare()), which makes it
less us
On Friday, 8 May 2020 05:05:43 PDT Hamish Moffatt wrote:
> On 8/5/20 6:54 pm, Florian Bruhin wrote:
> > On Fri, May 08, 2020 at 08:51:19AM +, Hamish Moffatt wrote:
> >> On 8/5/20 5:13 pm, Fabrice Mousset | GEOCEPT GmbH wrote:
> >>> Perhaps you should use QString::localeAwareCompare() ?
> >>
>
On 8/5/20 6:54 pm, Florian Bruhin wrote:
On Fri, May 08, 2020 at 08:51:19AM +, Hamish Moffatt wrote:
On 8/5/20 5:13 pm, Fabrice Mousset | GEOCEPT GmbH wrote:
Perhaps you should use QString::localeAwareCompare() ?
Thanks, I didn't know about that. Maybe the QString::compare() documentatio
On Fri, May 08, 2020 at 08:51:19AM +, Hamish Moffatt wrote:
> On 8/5/20 5:13 pm, Fabrice Mousset | GEOCEPT GmbH wrote:
> > Perhaps you should use QString::localeAwareCompare() ?
>
>
> Thanks, I didn't know about that. Maybe the QString::compare() documentation
> could mention it...
From http
On 8/5/20 5:13 pm, Fabrice Mousset | GEOCEPT GmbH wrote:
Perhaps you should use QString::localeAwareCompare() ?
Thanks, I didn't know about that. Maybe the QString::compare()
documentation could mention it...
Hamish
___
Interest mailing list
Int
Perhaps you should use QString::localeAwareCompare() ?
BR
Fabrice
> -Ursprüngliche Nachricht-
> Von: Interest Im Auftrag von Hamish
> Moffatt
> Gesendet: Freitag, 8. Mai 2020 08:27
> An: Qt Interest
> Betreff: [Interest] unexpected result from QString::compare
>
I'm trying to sort a list of strings where umlauts are involved, and not
getting the answer I expect from QString::compare(). My sample code is:
auto a = QStringLiteral("Äbc");
auto b = QStringLiteral("BCD");
auto c = a.compare(b);
qDebug() << a << b << c;
This p