diff options
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 9ac687557..9df4cc678 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -626,28 +626,12 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, if (node != 0 && node->parent() && !node->parent()->isInternal()) { if (node->type() == Node::Function) { FunctionNode *func = (FunctionNode *) node; - const FunctionNode *from = func->reimplementedFrom(); - if (from == 0) { - if (isWorthWarningAbout(doc)) { - doc.location().warning(tr("Cannot find base function for '\\%1' in %2()") - .arg(COMMAND_REIMP).arg(node->name()), - tr("The function either doesn't exist in any " - "base class with the same signature or it " - "exists but isn't virtual.")); - } - } - /* - Ideally, we would enable this check to warn whenever - \reimp is used incorrectly, and only make the node - internal if the function is a reimplementation of - another function in a base class. - */ - else if ((from->access() == Node::Private - || from->parent()->access() == Node::Private) - && isWorthWarningAbout(doc)) { - doc.location().warning(tr("'\\%1' in %2() should be '\\internal' " - "because its base function is private " - "or internal").arg(COMMAND_REIMP).arg(node->name())); + if (func->reimplementedFrom().isEmpty() && isWorthWarningAbout(doc)) { + doc.location().warning(tr("Cannot find base function for '\\%1' in %2()") + .arg(COMMAND_REIMP).arg(node->name()), + tr("The function either doesn't exist in any " + "base class with the same signature or it " + "exists but isn't virtual.")); } func->setReimplemented(true); } |