diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-01-14 13:13:45 +0100 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2021-01-21 09:42:22 +0100 |
commit | 0f3c3156c4955500134ccbdc40b0e2f254442ad1 (patch) | |
tree | 64fa2ae4103f171f71627e372a5e7a7e677f5d1d /src/qdoc/cppcodeparser.cpp | |
parent | e30ba4745c9707cab0e016f7609c4638e74651b6 (diff) | |
download | qttools-0f3c3156c4955500134ccbdc40b0e2f254442ad1.tar.gz |
qdoc: Allow overriding documentation from abstract QML base types
QDoc replicates property/function documentation from abstract QML base
types to the reference of the inheriting type. Attempting to override
a member documentation for the inheriting type resulted in duplication:
both the base and inheriting docs were rendered.
As the decision on what's shown on the type reference is deferred to
constructing the sections, implement this logic there. Modify
FunctionNode::compare() so that we can compare methods from
different parents, allowing us to override a specific overload of
a method.
Pick-to: 6.0
Fixes: QTBUG-89913
Change-Id: I3fb56c747e72b5a6ff387667e035a959e8f1c479
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index d49566ba9..c3f673b8d 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -791,7 +791,7 @@ FunctionNode *CppCodeParser::parseMacroArg(const Location &location, const QStri macro->setLocation(location); macro->setReturnType(returnType); macro->setParameters(params); - if (oldMacroNode && macro->compare(oldMacroNode)) { + if (macro->compare(oldMacroNode)) { location.warning(QStringLiteral("\\macro %1 documented more than once").arg(macroArg)); oldMacroNode->doc().location().warning(QStringLiteral("(The previous doc is here)")); } |