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

qdoc: Improve handling of function overloads

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • 6.8.0 FF
    • 6.7
    • Build tools: qdoc
    • None
    • 523be967e (dev)
    • DaVinci 94

    Description

      QDoc keeps track of functions recognized by Clang by storing them in a tree structure as nodes, where each node (FunctionNode) has a parent node (representing a class, namespace, or a header file). If a function has overloads, those are added to a singly linked list of FunctionNode pointers, and the parent (e.g. a class) maintains the head of the linked list.

      This design is problematic especially for the implementation of the \relates command, as that moves the documented node to be under a new parent; if the moved node is a function with overloads, managing the linked list is problematic as QDoc must keep a reference to the function also in the original parent. For example, functions in the global namespace should be still searchable globally, in addition to a path qualified with the new parent.

      This leads to situations where the linked list of overloads is valid only from the perspective of a single parent.

      Replacing the linked list with e.g. a vector would simplify the related code, make it less error prone, and allow features such as relating a node to multiple parents.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes