Commit Graph

3 Commits

Author SHA1 Message Date
Morten Sørvig 5eaaee105a Don't use static QLocale instance
Avoid creating and initializing the QLocale instance
in a global constructor. This is generally not recommended
for non-constinit types, and additionally causes a crash
on WebAssembly in the QLocale backend implementation.

Pick-to: 6.10
Change-Id: I720c60bf89d39434022f61e8d71de7b4e8610d8e
Reviewed-by: Masoud Jami <masoud.jami@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2025-07-03 16:15:42 +02:00
Kai Köhne 8ccc066721 documentviewer: Simplify qt_add_translation setup
* Define i18n languages centrally
* Use canonical :/i18n directory (default)

Change-Id: I7e8d9c57512418c51843464622ec270dea1b3456
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2025-05-15 09:50:55 +02:00
Masoud Jami b743a98270 qtdoc: Extend documentviewer demo to use translations
This patch extends the documentviewer demo to use
text based translation for English and German, as follows:

- Add AbstractView::addTranslation(fileName) for inheriting
  plugin classes to optionally load own translations.

- Implement runtime translation switching. Provide option for
  plugins to benefit, if they implement their own runtime
  switching functionality.

Task-number: QTBUG-71856
Change-Id: Ic7782b7fa38d1121b140351f5eaa88ac027a6bcd
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2025-05-15 09:50:51 +02:00