summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/node.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2015-03-04 11:48:51 +0100
committerMartin Smith <martin.smith@digia.com>2015-03-07 09:47:23 +0000
commit100ffb60ef07e026a054b9df9007ec1b25698c90 (patch)
tree9f13a82559149a25a3d6d511d6cb6ead56b32f1e /src/tools/qdoc/node.h
parent94bad40392ad89489744e4d59889fa0e920063b4 (diff)
qdoc: Teach qdoc to resolve namespaces
It turns out this bug was caused by modularization, which created the situation where members of the Qt namespace are in different modules. Most are in QtCore, but a few are in QtGui. qdoc was creating a namespace node for the Qt namespace in the node tree for QtCore, and another namespace node in the node tree for QtGui. This meant that there were two NamespaceNodes for the Qt namespace. Correctly, only one of these nodes contained the text for the \namespace command for the Qt namespace. This was the namespace node that was being used to create the HTML reference page for the Qt namespace. Unfortunately, the Qt namespace node in the tree for QtGui was not being merged into the Qt namespace node in QtCore, so some of the members of the Qt namespace were not being shown on the reference page. This update teches qdoc how to merge namespace nodes to ensure that all the members appear on the reference page for the namespace. There can be a namespace node for the namespace xxx in any number of modules, but they will all be merged into the namespace node for namespace xxx that contains the qdoc comment for \namespace xxx. Change-Id: I0f6a653ea6f920aacd5d8e13f9865488d95f6458 Task-number: QTBUG-44688 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/node.h')
-rw-r--r--src/tools/qdoc/node.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h
index b6717b3b1b..5eeb7e7d3d 100644
--- a/src/tools/qdoc/node.h
+++ b/src/tools/qdoc/node.h
@@ -373,9 +373,7 @@ public:
virtual ~InnerNode();
Node* findChildNode(const QString& name, Node::Genus genus) const;
- //Node* findChildNode(const QString& name, bool qml) const;
Node* findChildNode(const QString& name, Type type);
- //void findNodes(const QString& name, NodeList& n);
virtual void findChildren(const QString& name, NodeList& nodes) const Q_DECL_OVERRIDE;
FunctionNode* findFunctionNode(const QString& name) const;
FunctionNode* findFunctionNode(const FunctionNode* clone);
@@ -410,6 +408,8 @@ public:
const QStringList& groupNames() const { return groupNames_; }
virtual void appendGroupName(const QString& t) Q_DECL_OVERRIDE { groupNames_.append(t); }
void printChildren(const QString& title);
+ void addChild(Node* child);
+ void removeChild(Node* child);
protected:
InnerNode(Type type, InnerNode* parent, const QString& name);
@@ -418,9 +418,7 @@ private:
friend class Node;
static bool isSameSignature(const FunctionNode* f1, const FunctionNode* f2);
- void addChild(Node* child);
void removeRelated(Node* pseudoChild);
- void removeChild(Node* child);
QString outputFileName_;
QStringList pageKeywds;
@@ -455,9 +453,14 @@ public:
virtual ~NamespaceNode() { }
virtual bool isNamespace() const Q_DECL_OVERRIDE { return true; }
virtual Tree* tree() const Q_DECL_OVERRIDE { return (parent() ? parent()->tree() : tree_); }
+ virtual bool wasSeen() const Q_DECL_OVERRIDE { return seen_; }
+
+ void markSeen() { seen_ = true; }
+ void markNotSeen() { seen_ = false; }
void setTree(Tree* t) { tree_ = t; }
private:
+ bool seen_;
Tree* tree_;
};