summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2020-03-06 06:38:01 +0100
committerPaul Wicking <paul.wicking@qt.io>2020-03-06 14:54:41 +0100
commitfcd523048f02025e7563a4a6a17f6e5ff98ca6bb (patch)
tree4cfd07631eaf73a259745e2beb96356c539712b8 /src
parente18472fdd03a1a0633aa153ba8e579be4869fcf3 (diff)
QDoc: Use correct node type string for \since in shared comments
Shared comment nodes were not handled as a special case when generating "This [class/function/method/type/etc] was introduced in" strings when QDoc encountered a \since command. These ended up with the default value, "documentation", which led to unexpected text in the documentation. * Add handling of shared comment nodes and get the node type from the first node in the collective. * Amend generated output test to cover this scenario. Fixes: QTBUG-82534 Change-Id: I444e95e0214f312649ec2720c23c98e698402abf Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qdoc/generator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index abf0602df..bdeeec2be 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -2219,6 +2219,10 @@ QString Generator::typeString(const Node *node)
case Node::JsModule:
case Node::QmlModule:
return "module";
+ case Node::SharedComment: {
+ const auto &collective = static_cast<const SharedCommentNode *>(node)->collective();
+ return collective.first()->nodeTypeString();
+ }
default:
return "documentation";
}