Skip to content

Draft: Don't expose KActionCollection in the API

Nicolas Fella requested to merge work/nico/actions into master

KXmlGui is a rather ugly dependency in an otherwise mostly widgets-free codebase

Users of the API also typically don't need the full features of KActionCollection, just a way to obtain specific actions and add custom ones

Also accessing known actions by string id is error-prone

Instead expose only a list of action names as well as a way to obtain a specific action by name and a way to add actions

For builtin actions also provide an enum for type safety

KActionCollection is still used internally, but this gives us the option of removing it at a later point

Task: https://phabricator.kde.org/T12141

Draft because:

  • Needs testing
  • Needs documentation
  • plasma-workspace needs to be ported

Merge request reports