diff options
author | Topi Reinio <topi.reinio@digia.com> | 2015-08-12 11:00:19 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@digia.com> | 2015-08-19 11:30:23 +0000 |
commit | d558100aa71f714342526c072005ad3bcef88d0f (patch) | |
tree | 100824281ff956d4495541cbb42537a605003057 /src/tools/qdoc/cppcodeparser.cpp | |
parent | 53762b102bc656c1f9b294b164f9b494a6d78da7 (diff) |
qdoc: Improve resolving related non-members and their overload numbers
There were several problems related to resolving related non-member
(RNM) functions for classes. This commit does the following changes:
- Overload numbers for RNMs are now calculated at the time the
\relates command is processed, instead of a separate step.
- If a \relates refers to an entity outside the module boundary,
write the argument passed to it as-is into the index file.
- Delay the destruction of QDocIndexFiles singleton, to resolve
the RNMs read from the index files prior to generating docs.
- Remove the redundant call to normalizeOverloads() for single-
exec mode as unnecessary.
These changes ensure that all RNMs are listed in the documentation
for the node that they belong to.
A remaining issue is that if a function relates to a class outside
the module boundary, that function documentation will be empty
because the doc content is not stored into the index file (for
obvious reasons). Single-exec mode does not have this problem.
Change-Id: I33f038120728932cd9fd70da28d9090023068bd6
Task-number: QTBUG-47589
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/tools/qdoc/cppcodeparser.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 0f70777256..46a62d629f 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -924,8 +924,14 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, else if (command == COMMAND_RELATES) { QStringList path = arg.split("::"); Node* n = qdb_->findRelatesNode(path); - if (!n) - doc.location().warning(tr("Cannot find '%1' in '\\%2'").arg(arg).arg(COMMAND_RELATES)); + if (!n) { + // Store just a string to write to the index file + if (Generator::preparing()) + node->setRelates(arg); + else + doc.location().warning(tr("Cannot find '%1' in '\\%2'").arg(arg).arg(COMMAND_RELATES)); + + } else node->setRelates(static_cast<Aggregate*>(n)); } |