summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qdoc/tree.h')
-rw-r--r--src/tools/qdoc/tree.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/tools/qdoc/tree.h b/src/tools/qdoc/tree.h
index 1e9612aeec..1fef15bc6d 100644
--- a/src/tools/qdoc/tree.h
+++ b/src/tools/qdoc/tree.h
@@ -49,14 +49,19 @@ class QDocDatabase;
struct TargetRec
{
public:
- enum Type { Unknown, Target, Keyword, Contents, Class, Function, Page, Subtitle };
+ enum TargetType { Unknown, Target, Keyword, Contents, Class, Function, Page, Subtitle };
TargetRec(const QString& name,
const QString& title,
- TargetRec::Type type,
+ TargetRec::TargetType type,
Node* node,
int priority)
- : node_(node), ref_(name), title_(title), priority_(priority), type_(type) { }
+ : node_(node), ref_(name), title_(title), priority_(priority), type_(type) {
+ // Discard the dedicated ref for keywords - they always
+ // link to the top of the QDoc comment they appear in
+ if (type == Keyword)
+ ref_.clear();
+ }
bool isEmpty() const { return ref_.isEmpty(); }
@@ -64,7 +69,7 @@ struct TargetRec
QString ref_;
QString title_;
int priority_;
- Type type_;
+ TargetType type_;
};
struct TargetLoc
@@ -102,12 +107,15 @@ class Tree
ClassNode* findClassNode(const QStringList& path, const Node* start = 0) const;
NamespaceNode* findNamespaceNode(const QStringList& path) const;
FunctionNode* findFunctionNode(const QStringList& parentPath, const FunctionNode* clone);
- const Node* findFunctionNode(const QString& target, const Node* relative, Node::Genus genus);
+ const Node* findFunctionNode(const QString& target,
+ const QString& params,
+ const Node* relative,
+ Node::Genus genus) const;
Node* findNodeRecursive(const QStringList& path,
int pathIndex,
const Node* start,
- Node::Type type) const;
+ Node::NodeType type) const;
Node* findNodeRecursive(const QStringList& path,
int pathIndex,
Node* start,
@@ -134,22 +142,22 @@ class Tree
QmlTypeNode* findQmlTypeNode(const QStringList& path);
- Node* findNodeByNameAndType(const QStringList& path, Node::Type type) const;
- InnerNode* findRelatesNode(const QStringList& path);
+ Node* findNodeByNameAndType(const QStringList& path, Node::NodeType type) const;
+ Aggregate* findRelatesNode(const QStringList& path);
QString getRef(const QString& target, const Node* node) const;
void insertTarget(const QString& name,
const QString& title,
- TargetRec::Type type,
+ TargetRec::TargetType type,
Node* node,
int priority);
- void resolveTargets(InnerNode* root);
+ void resolveTargets(Aggregate* root);
const Node* findUnambiguousTarget(const QString& target, QString& ref) const;
const DocumentNode* findDocumentNodeByTitle(const QString& title) const;
void addPropertyFunction(PropertyNode *property,
const QString &funcName,
PropertyNode::FunctionRole funcRole);
- void resolveInheritance(InnerNode* n = 0);
+ void resolveInheritance(Aggregate* n = 0);
void resolveInheritanceHelper(int pass, ClassNode* cn);
void resolveProperties();
void resolveCppToQmlLinks();
@@ -158,6 +166,7 @@ class Tree
NamespaceNode *root() { return &root_; }
const FunctionNode *findFunctionNode(const QStringList &path,
+ const QString& params,
const Node *relative = 0,
int findFlags = 0,
Node::Genus genus = Node::DontCare) const;