Skip to content

Remove usage of context properties for theme and units

Jan Blackquill requested to merge work/cblack/no-ambiguity into master

This exposes the theme and units objects as singletons at PlasmaCore.Theme and PlasmaCore.Units and ports components to the new singleton API.

Context properties are a poor idea to expose API, as

  1. They're easily overshadowed, especially since theme and units are common words that are likely to be used as IDs or as context properties, resulting in vague (or worse, silent) errors that don't help authors figure out what they did wrong
  2. They're getting yeeted in the next version of QML AFAIK, so getting used to no context properties now is a good idea
  3. They can result in ambiguity, which causes the QML engine to error/warn

This patch leaves the units and theme context properties alone to avoid breaking stuff that will still use them.

Merge request reports

Loading