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

Q_OBJECT in signature of QObject::tr docs, instead of default values of parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.3
    • Fix Version/s: None
    • Labels:
      None

      Description

      As of right now, https://doc.qt.io/qt-5/qobject.html#tr shows a signature for QObject::tr as

      QString QObject::tr(const char *sourceText, const char *disambiguation = Q_OBJECT, int n = Q_OBJECT)

      The source for the documentation in qobject.cpp is

      {{/*!}}
        \fn QString QObject::tr(const char *sourceText, const char *disambiguation, int n)
        \reentrant

      and the signature in the header is

      static QString tr(const char *sourceText, const char * = nullptr, int = -1)

      qdoc should document the default values of the parameters. Note that the parameters are unnamed in the header file, which might be throwing qdoc off somehow.

        Attachments

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

          Activity

            People

            Assignee:
            gbk Martin Smith (Qt)
            Reporter:
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes