Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92450

Automatically generate QML enum documentation from C++

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.8.0 FF
    • None
    • Build tools: qdoc
    • None
    • dd934e466 (dev)
    • DaVinci 95

      If we expose a function accepting or returning an enumeration from C++ to QML, the documentation lists the type simply as "enumeration".

      However, if the enum is already documented in C++, and the containing class or namespace is registered to QML, we should be able to do better: Namely, we can reuse the existing documentation to extract the enumerator (and value) description. The only thing that would need to change is replacing NameSpace::Enumerator with RegisteredName.Enumerator.

      That would avoid manual repetition of documentation, which is prone to become stale.

      From a user's point of view, it would be ideal if this could be fully automated; it would however be a vast improvement if we could do something akin to

      \generateQmlEnumDoc

      {qmlname} {cppname}

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            treinio Topi Reiniƶ
            fabiankosmale Fabian Kosmale
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes