Skip to content

425370 Add OS-specific action property retrieval to KisActionRegistry

This MR enables the retrieval of operating system-specific action properties.

OS-specific action properties are labeled with the attributes "operatingSystem" (for the selected OS; currently only "macos" is defined) and "operatingSystemElse" (for the rest).

This commit adds a function, getChildContentForOS, that:

  • When finding a matching "operatingSystem", returns the given node's text
  • When finding a node with "operatingSystemElse", stores the last seen one
  • When finding a node without any of these parameters, stores the first seen one and ignores the rest

This commit implements said change on the Del and Backspace key shortcuts for macOS. See krita.action.

BUG: 425370

CCMAIL: kimageshop@kde.org

Test Plan

Compile Krita in macOS and check that Backspace correctly clears the canvas.

Alternatively, in a supported operating system: invert the condition #ifdef Q_OS_MACOS, compile Krita, and check the above.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Amy spark

Merge request reports