summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2019-04-05 12:24:10 +0200
committerMartin Smith <martin.smith@qt.io>2019-04-08 11:31:25 +0000
commit56b981aba25f22804f95cdad87472ba0807e8220 (patch)
tree938fa46b93d7f9302d9fe4377574c10b65d51cf6
parent713af3ea43c838a3015d00b924cad69191333977 (diff)
qdoc: Allow namespace members to use \relates
It had been required that \relates could only be used to relate global entities to a class. This change allows \relates to be used in the comments of entities in a named namespace. There are several cases in qtextstream.cpp Change-Id: I17b61dbdaf6b6bd8c420a2fa1fd9deef6b7125dc Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r--src/qdoc/cppcodeparser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp
index 0a1ee6461..74ae8a9ed 100644
--- a/src/qdoc/cppcodeparser.cpp
+++ b/src/qdoc/cppcodeparser.cpp
@@ -579,7 +579,8 @@ void CppCodeParser::processMetaCommand(const Doc &doc,
doc.location().warning(tr("Invalid '\\%1' not allowed in '\\%2'")
.arg(COMMAND_RELATES, node->nodeTypeString()));
} else if (!node->isRelatedNonmember() &&
- !node->parent()->name().isEmpty() &&
+ //!node->parent()->name().isEmpty() &&
+ !node->parent()->isNamespace() &&
!node->parent()->isHeader()) {
if (!doc.isInternal()) {
doc.location().warning(tr("Invalid '\\%1' ('%2' must be global)")