Details
-
Task
-
Resolution: Fixed
-
P2: Important
-
6.7
-
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.