From 08a55ca1e48f5be501446e618356b30c21ae8bd6 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 12 Nov 2019 13:05:13 +0100 Subject: qdoc: Avoid excessive 'Illegal \reimp' warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ --- src/qdoc/generator.cpp | 9 ++++----- 1 file 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())); } } } -- cgit v1.2.3