-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
a21cb0282 (dev), e96f56a7d (6.10), de185ade0 (6.9), cc0aac404 (tqtc/lts-6.8), acc6b9335 (tqtc/lts-6.5)
The readEnvironment() / initFromEnvironment() functions contain a lot of qgetenv() calls, each of which locks the environmentMutex again and copies data into QByteArrays.
This happens at every application startup. And for LocaleChange, it can even deadlock if code under environmentMutex happens to end up in the system locale.
A solution would be to go the qTzSet() way and move the code into qenvironmentvariables.cpp so we have access to environmentMutex and can lock it once for the whole operation (which might even remove the need for one or the other QByteArray, esp. if QTBUG-138558 has landed and QLocale can create itself without a UTF-16 sequence).
The other would be to follow this epic and remove the environmentMutex, or give access to it to other TUs.
- relates to
-
QTBUG-108114 qlocale_unix.cpp mirrors setlocale()'s logic with environment variables
-
- Reported
-
- resulted from
-
QTBUG-135195 Review qtbase/src/corelib/text
-
- In Progress
-