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

Automatically generate QML enum documentation from C++

    XMLWordPrintable

Details

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

    Description

      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}

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-92450
          # Subject Branch Project Status CR V

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes