D16595: Fix i18n when the kcm code is embedded in the plasmoid config

Kai Uwe Broulik noreply at phabricator.kde.org
Thu Nov 1 22:50:33 GMT 2018


broulik added a comment.


  We use everything in Plasma "as a library", that's why `KDeclarative::QmlObject` sets a translation context on the root context, so that plasmoids, wallpaper plugins, and other QML bits can use `i18n` with no translation domain (only exception really being the look and feel packages). I'm too tired to explain right now but note when you run the KCM from within Plasma you get a warning like:
  
    QQmlContext: Cannot set context object for internal context.
    QQmlContext: Cannot set property on internal context.
  
  That is what breaks the translations in this case and used to work until we shared `QQmlEngines` between the KCM and the window around it. However, if we don't then the KCM uses the Plasma Qt Quick Controls style which is also undesirable. We also don't want separate `QQmlEngine`s as then you run into bugs and crashes since we would have objects (e.g. context properties and singletons) between engines and they clean up each other's stuff and crash.

REPOSITORY
  R115 Plasma Audio Volume Applet

REVISION DETAIL
  https://phabricator.kde.org/D16595

To: aacid, #plasma, davidedmundson, mart
Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20181101/c817d031/attachment.html>


More information about the Plasma-devel mailing list