On 19/07/2026 00:38, NIkolai Marchenko wrote:
I am not exactly sure if your wording covers the qlocale::toDouble(string,bool&) or not. aka non const but also partially not same data.
Well, the signature is
double QLocale::toDouble(const QString &s, bool *ok = nullptr) const
Therefore, in the extended contract, it's OK to call this function from multiple threads, without synchronization, on the same QLocale object and/or on the same QString object. It's not OK to call it on the same bool object.
Without the extended contract, do note that it's formally illegal to call this function on the same QString instance, even if called on different QLocale instances. toDouble() could call something like `s.utf16()` internally, which isn't thread-safe.
My 2 c, -- Giuseppe D'Angelo | [email protected] | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - Trusted Software Excellence
smime.p7s
Description: S/MIME Cryptographic Signature
-- Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
