diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-03-11 14:25:25 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-03-22 11:20:46 +0000 |
commit | 2bcf73713154a535507d9db1d2a431c4d51861e7 (patch) | |
tree | 4d496250a400c138278097d395504b91c2f93212 | |
parent | f68c6a714257642e6995abe4caac165b532e8843 (diff) | |
download | qttools-2bcf73713154a535507d9db1d2a431c4d51861e7.tar.gz |
qdoc: WebXML generator: Do not auto-link to obsolete nodes
Unless the relative node (where the link comes from) is also marked
obsolete. This brings the behavior in line with other generators.
Change-Id: I4a5a99b7a5dc29c9011d1f6b8d28d53fd07ecb93
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 11e61de37525d69918689e5b4ccd8c9c17a4f412)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/qdoc/webxmlgenerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/webxmlgenerator.cpp b/src/qdoc/webxmlgenerator.cpp index 08e5d06d0..00cceb9a5 100644 --- a/src/qdoc/webxmlgenerator.cpp +++ b/src/qdoc/webxmlgenerator.cpp @@ -302,6 +302,10 @@ const Atom *WebXMLGenerator::addAtomElements(QXmlStreamWriter &writer, const Ato if (!m_inLink && !m_inSectionHeading) { const Node *node = nullptr; QString link = getAutoLink(atom, relative, &node, Node::API); + if (!link.isEmpty() && node && node->status() == Node::Obsolete + && relative->parent() != node && !relative->isObsolete()) { + link.clear(); + } if (node) { startLink(writer, atom, node, link); if (m_inLink) { |