summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/overview/using-qt-gui.cmake
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-08-01 09:59:45 +0200
committerMarc Mutz <marc.mutz@qt.io>2025-08-01 17:46:03 +0200
commitf7b9c9f60884db76c0c5b36ba333c3538ce6f2ec (patch)
treec94b3c9bfcb5b80f732a187068510b193a4a47df /src/gui/doc/snippets/overview/using-qt-gui.cmake
parent6124555fb5ecec05682e53d7fe9e27394a44e981 (diff)
QTranslator: drag QLocale::uiLanguages() call out of critical section
According to a code comment in QLocale::uiLanguages(), the function has O(N³) complexity. OTOH, the only use of QTranslatorPrivate::load_translation()'s QLocale argument is a call to uiLanguages(), so we might as well just pass the QStringList result of that function call to load_translations() instead of the QLocale itself.. Do that, and then call uiLanguages() before taking the QTranslator mutex. There are still tons of IO operations performed under the lock, so this is drop on the hot stone, but it's also easy to do, so do it. Amends the start of the public history. Task-number: QTBUG-138851 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ieea899dd2829437e659f7b22dfcf578efe35ed00 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/overview/using-qt-gui.cmake')
0 files changed, 0 insertions, 0 deletions