Commit 4d417394 authored by Topi Reinio's avatar Topi Reinio
Browse files

qdoc: Fix issues with related non-members


The \relates command sets a node as a related non-member of another
node, and sets that node as the new parent. However, the old parent
still holds a pointer to the newly-adopted node; this is needed for
searching. Some locations in the code did not handle the
possibility of parent's children reporting a different node as
their parent.

Skipping these nodes when traversing the node tree eliminates
duplicate entries from .qhp files. These duplicates are however
needed in the .index files for linking to work, as links may
reference both the global namespace and the scope the node
relates to.

Remove these duplicates from .qhp files, and omit parent names
when generating 'id' attributes for related non-members. This
reverts the .qhp content to what it was in Qt 5.12.

Parents of related members must be skipped when resolving the full
name of the node, otherwise searching for the name is likely to
fail.

Non-members related to a header file did not receive a valid
location ('href').

Task-number: QTBUG-78474
Change-Id: Ie126219e8101beaa051f2f4a1a9f93c731fc8168
Reviewed-by: default avatarPaul Wicking <paul.wicking@qt.io>
Reviewed-by: default avatarMartin Smith <martin.smith@qt.io>
Showing with 12 additions and 5 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment