Watch for language change events, and forward those to the QML engine

Authored by vkrause on Feb 23 2020, 12:38 PM.

Description

Watch for language change events, and forward those to the QML engine

Summary:
This fixes a race condition on startup for the Kirigami translation
catalog that happens as follows:

  • QML code triggers the loading of the Kirigami plugin
  • the ECM QM loader is triggered, but since this is running outside of the

main thread, the actual QM loading is deferred to the main thread

  • QML code execution continues, at which point qsTr might still return

unstranslated strings

This is for example visible by the "Actions" header in the context drawer
of the main application page not getting translated.

Reviewers: mart

Reviewed By: mart

Subscribers: apol, plasma-devel

Tags: Kirigami

Differential Revision: https://phabricator.kde.org/D27595

Details

Committed
vkrauseFeb 26 2020, 5:14 PM
Reviewer
mart
Differential Revision
D27595: Watch for language change events, and forward those to the QML engine
Parents
R169:8bf5b4675186: Support Qt 5.14 on Android
Branches
Unknown
Tags
Unknown