diff options
author | Martin Smith <martin.smith@nokia.com> | 2012-03-30 13:43:46 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-02 12:30:04 +0200 |
commit | 9b0c0823c067eb0c072a6f35caec5cb31809a1b4 (patch) | |
tree | 406184aff17476566f1744e297ce93a493693725 /src/tools/qdoc/tree.h | |
parent | f733a0044ef9e31af0577d5b2695c659e29dc2e8 (diff) |
qdoc: Allow documenting a C++ class as a QML type.
Now qdoc can handle the case where a C++ class is
documented as a QML type of the same name, or as
both a C++ class and a QML type of the same name.
And collisions pages are created for both the HTML
and the DITA XML output. A collision page is created
when two items have the same name. The collision
pages will be augmented later to include the list
of pages where ambiguous links to one of the items
listed on the collision page are actually located,
so the writer can go back to those links and add
the appropriate qualifier.
Change-Id: I5a9632b2d2209e0784392047056bed8962005624
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/tools/qdoc/tree.h')
-rw-r--r-- | src/tools/qdoc/tree.h | 61 |
1 files changed, 35 insertions, 26 deletions
diff --git a/src/tools/qdoc/tree.h b/src/tools/qdoc/tree.h index d39babfab0..62f599598e 100644 --- a/src/tools/qdoc/tree.h +++ b/src/tools/qdoc/tree.h @@ -65,19 +65,39 @@ public: Tree(); ~Tree(); - Node* findNode(const QStringList &path, - Node* relative=0, - int findFlags=0, - const Node* self=0); - Node* findNode(const QStringList &path, - Node::Type type, - Node* relative = 0, - int findFlags = 0); + EnumNode* findEnumNode(const QStringList& path, Node* start = 0); + ClassNode* findClassNode(const QStringList& path, Node* start = 0); + QmlClassNode* findQmlClassNode(const QStringList& path, Node* start = 0); + NamespaceNode* findNamespaceNode(const QStringList& path, Node* start = 0); + FakeNode* findGroupNode(const QStringList& path, Node* start = 0); + FakeNode* findQmlModuleNode(const QStringList& path, Node* start = 0); + + Node* findNodeByNameAndType(const QStringList& path, + Node::Type type, + Node::SubType subtype, + Node* start, + bool acceptCollision = false); + + Node* findNodeRecursive(const QStringList& path, + int pathIndex, + Node* start, + Node::Type type, + Node::SubType subtype, + bool acceptCollision = false); + + const Node* findNode(const QStringList &path, + const Node* relative = 0, + int findFlags = 0, + const Node* self=0) const; + + private: const Node* findNode(const QStringList& path, const Node* start, int findFlags, const Node* self, bool qml) const; + + public: QmlClassNode* findQmlClassNode(const QString& module, const QString& name); NameCollisionNode* checkForCollision(const QString& name) const; NameCollisionNode* findCollisionNode(const QString& name) const; @@ -111,17 +131,8 @@ public: void fixInheritance(NamespaceNode *rootNode = 0); void setVersion(const QString &version) { vers = version; } NamespaceNode *root() { return &roo; } - QString version() const { return vers; } - const Node* findNode(const QStringList &path, - const Node* relative = 0, - int findFlags = 0, - const Node* self=0) const; - const Node* findNode(const QStringList &path, - Node::Type type, const - Node* relative = 0, - int findFlags = 0) const; - const QmlClassNode* findQmlClassNode(const QString& module, const QString& element) const; + const FunctionNode *findFunctionNode(const QStringList &path, const Node *relative = 0, int findFlags = 0) const; @@ -134,19 +145,17 @@ public: Atom *findTarget(const QString &target, const Node *node) const; const NamespaceNode *root() const { return &roo; } void readIndexes(const QStringList &indexFiles); - bool generateIndexSection(QXmlStreamWriter &writer, const Node *node, - bool generateInternalNodes = false) const; - void generateIndexSections(QXmlStreamWriter &writer, const Node *node, - bool generateInternalNodes = false) const; + bool generateIndexSection(QXmlStreamWriter& writer, Node* node, bool generateInternalNodes = false); + void generateIndexSections(QXmlStreamWriter& writer, Node* node, bool generateInternalNodes = false); void generateIndex(const QString &fileName, const QString &url, const QString &title, - bool generateInternalNodes = false) const; + bool generateInternalNodes = false); void generateTagFileCompounds(QXmlStreamWriter &writer, - const InnerNode *inner) const; + const InnerNode *inner); void generateTagFileMembers(QXmlStreamWriter &writer, - const InnerNode *inner) const; - void generateTagFile(const QString &fileName) const; + const InnerNode *inner); + void generateTagFile(const QString &fileName); void addExternalLink(const QString &url, const Node *relative); QString fullDocumentLocation(const Node *node) const; void resolveQmlInheritance(); |