summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2019-11-12 13:05:13 +0100
committerTopi Reinio <topi.reinio@qt.io>2020-02-07 12:25:03 +0100
commit08a55ca1e48f5be501446e618356b30c21ae8bd6 (patch)
tree0b29b2c6ed24227ee907e01314778f842b7f3b8b
parent46bb348b8e7b8dd2e5d67f73948a0f2aa1801ac3 (diff)
qdoc: Avoid excessive 'Illegal \reimp' warningsv5.15.0-alpha1
In Generator::generateReimplementsClause(), QDoc tries to output reimplementation information for function nodes, and intends to print out a warning if there is no documented virtual function in the base class to override. This warning was triggered too often - especially, when the base implementation was an \internal class, and the documented reimplementation did not even use the \reimp command. This commit fixes the warning to be omitted for \internal base member functions. Change-Id: Ic39327520b28e5034c489a4037297210fa8b10d9 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/generator.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index f4a391cee..fa442994e 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -1260,8 +1260,11 @@ void Generator::generateReimplementsClause(const FunctionNode *fn, CodeMarker *m
appendFullName(text, overrides->parent(), fullName, overrides);
text << "." << Atom::ParaRight;
generateText(text, fn, marker);
- return;
+ } else {
+ fn->doc().location().warning(tr("Illegal \\reimp; no documented virtual function for %1")
+ .arg(overrides->plainSignature()));
}
+ return;
}
const PropertyNode *sameName = cn->findOverriddenProperty(fn);
if (sameName && sameName->hasDoc()) {
@@ -1271,10 +1274,6 @@ void Generator::generateReimplementsClause(const FunctionNode *fn, CodeMarker *m
appendFullName(text, sameName->parent(), fullName, sameName);
text << "." << Atom::ParaRight;
generateText(text, fn, marker);
- } else {
- fn->doc().location().warning(
- tr("Illegal \\reimp; no documented virtual function for %1")
- .arg(fn->plainSignature()));
}
}
}