-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.10.0
-
-
DaVinci 128
\qmlenum is the most recent additions to qdoc, enabling authors to document enums in QML. The problem though is that the command automatically adds the prefix to the \value entries based on the type info. in the argument to \qmlenum. In most cases, this is sufficient and works well, but for example, the following command documents the `Weight` enum for the `font` value type:
/*!
\qmlenum font::Weight
\brief Provides a list of font weights to choose from.
\value Thin 100
\value ExtraLight 200
\value Light 300
\value Normal 400
\value Medium 500
\value DemiBold 600
\value Bold 700
\value ExtraBold 800
\value Black 900
*/
In this snippet, note that `font` is the type name, so qdoc adds this as prefix for all the \value entries in the comment block. In this case though, the prefix should be title case, `Font`. At the moment, there's is no way to override this unless I document `Font` as another \qmltype or \qmlvaluetype, and then document the enumeration as `\qmlenum Font::Weight`.
If I were to copy the \value entries from an existing C++ enumerator documentation, I could use the \qmlenumeratorsfrom command, which lets me override the prefix. We need a similar solution for \qmlenum too.