Skip to content

Draft: Rename unnamespaced custom QQuickItems, and specify their imports

Joshua Goins requested to merge work/redstrate/fix-namespaces into master

Reasoning

These components are of QQuickItem type, and not public C++ interfaces. Despite this, doxygen will gladly run them over like C++ classes (because it doesn't know any better, unfortunately) and even take their namespace. Since these components aren't namespaced, there can be global collisions on api.kde.org (see frameworks/kapidox#17) but luckily we don't have to change it all code-wise - we simply need to change the documentation.

Changes

These components are now put under the Plasma namespace (in documentation only, which is fine because people don't import these classes in C++).

Here's some bonuses I found when doing so:

  • Specifying @since for these components, to provide a way for the developer to gauge which import statement to use (we do a similar thing in Kirigami already).
  • ToolTipDialog was exposed in the docs, now it's removed from the doc generation.
  • ToolTip has been renamed to it's actual name as exposed in QML, ToolTipArea.

image

Recommended to cherry-pick to KF5 so that the currently hosted documentation can be updated as well.

Merge request reports