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

Poor rendering of unnamed structs in documentation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.11.0 FF
    • 6.10.0 Beta4
    • Build tools: qdoc
    • 553f05755 (dev), 8c6045f15 (dev)
    • DaVinci 125

      Given a struct with an anonymous struct inside:

          template <typename AngleT>
          struct AxisAndAngle
          {
              struct {
                  float x, y, z;
                  Q_IMPLICIT constexpr operator QVector3D() const noexcept { return {x, y, z}; }
              } axis;
              AngleT angle;
          };
      

      When I try to document the axis member like this:

      /*!
          \variable QQuaternion::AxisAndAngle::axis
      
          The 3D axis that together with an \l{angle} corresponds to a
          \l{QQuaternion}{quaternion}.
      
          An unnamed struct containing members \c{x}, \c{y}, \c{z}. This data member
          implicitly converts to QVector3D.
      */
      

      Then this is the result:

      (cf. the file name in the type name)

      Expected: it shows something that is independent of the source code location, e.g. (unnamed struct).

      Work-around:

      struct
      #ifdef Q_QDOC
      __unnamed__
      #endif
      {
      

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

            paulwicking Paul Wicking
            mmutz Marc Mutz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes