summaryrefslogtreecommitdiff
path: root/src/qdoc/codemarker.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2018-02-12 12:11:25 +0100
committerMartin Smith <martin.smith@qt.io>2018-02-23 11:43:47 +0000
commit88472204d6ffd36eca05c88fb15233e9e8b94aa4 (patch)
tree35843663b0047bdf389e5bef37dbb99d4ccc18ba /src/qdoc/codemarker.cpp
parentc29a1b03fd0fe6cc3496a6a14c56f6ef3390b713 (diff)
downloadqttools-88472204d6ffd36eca05c88fb15233e9e8b94aa4.tar.gz
qdoc: Fix bugs in resolving inheritance and finding overridden functions
A class node must have pointers to the class nodes of its base classes, but these pointers might not exist when qdoc creates the class node for the class. They might not exist until all the index files and include files have been parsewd. qdoc was trying to resolve the base classes too early. This update lets qdoc wait until it is known that everything has been built before attempting to resolve inheritance. This update also delays finding the pointer to the function node for the overridden function for a function marked "override" until the pointer is needed. Instead of storing the pointer to the node, the qualification path to the function is stored as a string, and the string is used to look up the overridden function when it is needed, which is only when the \reimp command is processed during output. The function that resolves the pointer to the overridden function was moved to the function node class, where it makes more sense. The way a few qdoc warnings are reported was also changed. Change-Id: Ia54642d11242386ae75139065f481e5d30f79fb5 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/codemarker.cpp')
-rw-r--r--src/qdoc/codemarker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/codemarker.cpp b/src/qdoc/codemarker.cpp
index f655f28de..44d05053e 100644
--- a/src/qdoc/codemarker.cpp
+++ b/src/qdoc/codemarker.cpp
@@ -473,7 +473,7 @@ bool CodeMarker::insertReimpFunc(FastSection& fs, Node* node, Status status)
{
if ((node->access() != Node::Private) && (node->relates() == 0)) {
const FunctionNode* fn = static_cast<const FunctionNode*>(node);
- if ((fn->reimplementedFrom() != 0) && (status == Okay)) {
+ if (!fn->reimplementedFrom().isEmpty() && (status == Okay)) {
if (fn->parent() == fs.parent_) {
QString key = sortName(fn);
if (!fs.reimpMemberMap.contains(key)) {