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

Clarify behavior of \overload if main method has arguments

XMLWordPrintable

    • 0378aa3da (dev)
    • DaVinci 122

      the \overload documentation states:

      You can include the function name plus '()' as a parameter to the \overload command [...]

      So you might think that for say QTest::failOnWarning(const QRegularExpression &) overloads, it's enough to write

      /*!
          \since 6.8
          \overload failOnWarning()
      */
      void QTest::failOnWarning()
      {
          // ...
      }
      
      /*!
          \since 6.3
          \overload failOnWarning()
      */
      void QTest::failOnWarning(const char *message)
         // ...
      }
      
      /*!
          \since 6.3
      
          Appends a test failure to the test log for each warning that matches
          \a messagePattern.
          ...
      */
      void QTest::failOnWarning(const QRegularExpression &messagePattern)
      

      But this will lead to dead links. Instead, it seems one has to still fully qualify the method, e.g.

      /*!
          \since 6.8
          \overload failOnWarning(const QRegularExpression &)
      */
      void QTest::failOnWarning()
      

      This should be fixed, or made clearer in the documentation.

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

            paulwicking Paul Wicking
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes