QDoc: Prefer class members in member doc links


An unqualified link in the documentation of a class or QML type
reaches a matching member of the type or its base types before a
keyword or target with the same name. The same link in a member's
documentation, its see-also list, or a comment shared by several
members doesn't. It goes to the global `\keyword` or `\target`
first, so a link to a sibling or inherited member lands on an
unrelated page whenever such a keyword exists. Target names are
compared without regard to case or punctuation. This means the link
can also land on a target that only resembles the name, such as a
section about a function when the author meant the class with the
same spelling.

This change makes QDoc treat member documentation as part of its
class or QML type, so it follows the same lookup order as the type's
own documentation. Links in member documentation reach the member the
author most likely meant, and a link resolves the same way wherever
it appears in the type's documentation. Links from ordinary pages,
and links to names that no member of the type has, still resolve to
the global keyword or target.

Task-number: QTBUG-72107
Task-number: QTBUG-141606
Fixes: QTBUG-151210
Pick-to: 6.12
Change-Id: I3145e1e8cfe2ca55807df779736fb8b725bca2d9
Reviewed-by: David Boddie <david.boddie@qt.io>
commit03d589c93a8c0faa842c1683de5694cba11954d5
parenta9256721ff517996865252d6c08f775c09f9ee19
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeWed, 7 Oct 2026 18:27:25 +0000