summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2018-03-12 13:33:26 +0100
committerMartin Smith <martin.smith@qt.io>2018-03-22 15:46:44 +0000
commit7c815274fa95594130d8f66dd5b6931bf3044eca (patch)
tree97ff7b3b4a6eb58d7ebe0fff3fecdc23510b22f2
parentd745c2e616e953aad94eb1e899438bfab0b2baa2 (diff)
downloadqttools-7c815274fa95594130d8f66dd5b6931bf3044eca.tar.gz
qdoc: Allow shared comments for global functions
Shared comments were only allowed for functions that are members of classes. This update extends that functionality to functions in namespaces, including the global namespace. Change-Id: Ida855d8b49c6cdfa1fe900d96af9841e05a87aee Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/cppcodemarker.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp
index 1667f485b..5e8c3a37b 100644
--- a/src/qdoc/cppcodemarker.cpp
+++ b/src/qdoc/cppcodemarker.cpp
@@ -841,6 +841,13 @@ QList<Section> CppCodeMarker::sections(const Aggregate *inner,
}
}
break;
+ case Node::SharedComment:
+ {
+ SharedCommentNode *scn = static_cast<SharedCommentNode *>(*n);
+ if (!scn->doc().isEmpty())
+ insert(functions, scn, style, status);
+ }
+ break;
default:
break;
}