Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6, 6.7
-
None
-
-
13
Description
System L10n queries can be expensive, making it desirable to cache the responses.
However, we also want to be able to respond to changes to the system L10n settings, which we'll miss if we consult a cached value that predates the change.
This would require some mechanism, on each platform, for detecting when L10n settings have changed so as to trigger clearing the caches, for which QLocale would need to provide a static method.
We can then arrange for QLocale to take care of cacheing things it gets back from QSystemLocale::query() calls; it would then clear those caches (and trigger an updateSystemPrivate(), e.g. by instantiating a transient QSystemLocale instance) when the new mechanism alerts it to the need to change.
In so far as backends need to cache anything else internally, they can respond to QSystemLocale::query(QSystemLocale::LocaleChanged) by clearing that cached data; this happens during updateSystemPrivate().
Attachments
Issue Links
- is required for
-
QTBUG-125491 When switching languages from OS, Qt app also wants to switch the display language
- Reported
- relates to
-
QTBUG-56899 Add a static QTimeZone method to refresh system zone information
- Open
-
QTBUG-109201 toString() in macOS' system locale is very slow
- Open
-
QTBUG-104785 [REGR:5->6] Performance regression in QLocale on macOS
- Closed