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

QDoc: Allow authors to specify primary overload

XMLWordPrintable

    • 0378aa3da (dev)

      The \overload command has conflicting behaviors when its argument looks like a parameterless function call, such as \overload myFunc().

      1. Current Implementation: \overload myFunc() is treated as an explicit signature and links directly to the parameterless function myFunc(). This allows authors to specifically target the parameterless version.
      2. Documented/Expected Behavior: The documentation suggests that an unqualified \overload command should link to the primary overload of that function. Many users interpret \overload myFunc() as the simplest way to refer to the myFunc overload set, expecting it to resolve to the primary.

      This creates a "double-edged sword": if we change the behavior to always link to the primary, we lose the ability to explicitly link to a parameterless overload if it isn't the primary.

      A solution should preferably be backwards compatible with the documented behavior. Thus, adding an optional argument to the command seems like a sensible enhancement. 

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

            paulwicking Paul Wicking
            paulwicking Paul Wicking
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes