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

qdoc: non-member functions are documented as member functions

    XMLWordPrintable

Details

    • 5cfa917baf416f6234bd99e51f05514b1859e2fe (qt/qttools/5.13)

    Description

      I noticed this with https://doc.qt.io/qt-5/qjsengine.html#qjsEnginex

      The code looks like this:

      /*!
         \since 5.5
         \relates QJSEngine
      
         Returns the QJSEngine associated with \a object, if any.
      
         This function is useful if you have exposed a QObject to the JavaScript environment
         and later in your program would like to regain access. It does not require you to
         keep the wrapper around that was returned from QJSEngine::newQObject().
       */
      QJSEngine *qjsEngine(const QObject *object)
      {
      ...
      }
      

      but it's documented as

      Related Non-Members
      QJSEngine *QJSEngine::qjsEngine(const QObject *object)

      It should not have the QJSEngine:: prefix, because as the heading says, it's related but it's not a member function. When you want to use this function, it's without the scoping prefix.

      Attachments

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

        Activity

          People

            treinio Topi Reiniƶ
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes