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

overload command doesn't work with QML functions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7
    • None

    Description

      In https://codereview.qt-project.org/c/qt/qtdeclarative/+/487191/2/src/quicktemplates/qquickstackview.cpp, I define a QML function:

      /*!
          \qmlmethod Item QtQuick.Controls::StackView::replaceCurrentItem(items, operation)
          \since 6.6
      
          [...]
      
          \sa clear(), {Popping Items}, {Unwinding Items via Pop}
      */
      QQuickItem *QQuickStackView::replaceCurrentItem(const QList<QQuickStackViewArg> &args,
          Operation operation)
      

      https://doc.qt.io/qt-6/18-qdoc-commands-relating.html#overload-command has the following example:

      /*!
          \overload addAction()
      
          This convenience function creates a new action with an
          \a icon and some \a text. The function adds the newly
          created action to the menu's list of actions, and
          returns it.
      
          \sa QWidget::addAction()
      */
      QAction *QMenu::addAction(const QIcon &icon, const QString &text)
      {
          QAction *ret = new QAction(icon, text, this);
          addAction(ret);
          return ret;
      }
      

      So I did the same:

      /*!
          \overload replaceCurrentItem()
          \since 6.6
      
          Pops \l currentItem from the stack and pushes \a item using the optional
          \a operation, and optionally applies a set of \a properties on the item.
          Returns the item that became current.
      
          \include qquickstackview.qdocinc pop-ownership
      
          \include qquickstackview.qdocinc operation-values
      
          If no operation is provided, \c ReplaceTransition will be used.
      
          To push several items onto the stack, use \l replaceCurrentItem(items, operation).
      
          \sa {Replacing Items}
      */
      QQuickItem *QQuickStackView::replaceCurrentItem(QQuickItem *item, const QVariantMap &properties,
          Operation operation)
      

      However, the documentation for the overload isn't generated. There are no errors related to this in the build output.

      Attachments

        Issue Links

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

          Activity

            People

              docinfrastructure Documentation Infrastructure Team
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes