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

Allow links to differentiate between targetting a property and a method of the same name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7
    • Build tools: qdoc
    • None

    Description

      If there exists documentation for a property and the accessor function of the same name, links become ambiguous. We should either define that the property documentation takes precedence, or add a qualifier to \l to allow differentiation.

      This came up in the context of https://codereview.qt-project.org/c/qt/qtbase/+/529217.

      /*!
          Sets \l numericalPrecisionPolicy to \a precisionPolicy.
      */
      void QSqlDriver::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy)
      {
          Q_D(QSqlDriver);
          d->precisionPolicy = precisionPolicy;
      }
      
      /*!
          \property QSqlDriver::numericalPrecisionPolicy
          \since 6.8
      
          This property holds the precision policy for the database connection.
          \note Setting the precision policy doesn't affect any currently active queries.
      
          \sa QSql::NumericalPrecisionPolicy,
          QSqlQuery::numericalPrecisionPolicy(), QSqlQuery::setNumericalPrecisionPolicy()
      */
      /*!
          Returns the \l numericalPrecisionPolicy.
      */
      

      This will generate following documentation for setNumericalPrecisionPolicy:

      This looks correct (though a bit verbose). But all three links to numericalPrecisionPolicy actually point to the getter, and not the property (like it is intended for the first two).

      Attachments

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

        Activity

          People

            docinfrastructure Documentation Infrastructure Team
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes