From 9b58fe5c264cabe6912bb4fb7b045c2aecd98cb7 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 22 May 2015 13:59:13 +0200 Subject: qdoc: Related non-members are now linked correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was harder to fix this tan you might think, but the fix cleans up the overload mechanism a lot, so if no regressions are introduced by the fix, the code will be easier to manage. The related non-members are now added to the class node's list of secondary (overload) functions. This way, they get an overload number just like overloaded member functions. Change-Id: I68d7a314b0bb5ec0fbba15dc1fd40a5b870c659d Task-number: QTBUG-46148 Reviewed-by: Venugopal Shivashankar Reviewed-by: Topi Reiniƶ --- src/tools/qdoc/cppcodeparser.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/tools/qdoc/cppcodeparser.cpp') diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 0468f3691ed..ab79f8f3206 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -250,16 +250,11 @@ void CppCodeParser::doneParsingHeaderFiles() /*! This is called after all the source files (i.e., not the - header files) have been parsed. It traverses the tree to - resolve property links, normalize overload signatures, and - do other housekeeping of the database. + header files) have been parsed. Currently nothing to do. */ void CppCodeParser::doneParsingSourceFiles() { - qdb_->primaryTreeRoot()->normalizeOverloads(); - qdb_->fixInheritance(); - qdb_->resolveProperties(); - qdb_->primaryTreeRoot()->makeUndocumentedChildrenInternal(); + // contents moved to QdocDatabase::resolveIssues() } static QSet topicCommands_; @@ -886,13 +881,10 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, } } else if (command == COMMAND_OVERLOAD) { - if (node != 0 && node->type() == Node::Function) { - ((FunctionNode *) node)->setOverload(true); - } - else { - doc.location().warning(tr("Ignored '\\%1'") - .arg(COMMAND_OVERLOAD)); - } + if (node && node->isFunction()) + ((FunctionNode *) node)->setOverloadFlag(true); + else + doc.location().warning(tr("Ignored '\\%1'").arg(COMMAND_OVERLOAD)); } else if (command == COMMAND_REIMP) { if (node != 0 && node->parent() && !node->parent()->isInternal()) { -- cgit v1.2.3