diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-08-30 08:44:54 (GMT) |
---|---|---|
committer | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-08-30 08:44:54 (GMT) |
commit | 214a26fbde1c5600a10db59217ae9b63a46bce9e (patch) | |
tree | 601e9edf2832834f0ffef9c7b5c54303ce2f70d2 /tools/qdoc3/node.cpp | |
parent | 7f27ebb0383414f15f391151655e5b09952f8ccd (diff) | |
parent | ad203bc0bd17be1ade143e38cdc7e8eca26ebc07 (diff) | |
download | Qt-214a26fbde1c5600a10db59217ae9b63a46bce9e.zip Qt-214a26fbde1c5600a10db59217ae9b63a46bce9e.tar.gz Qt-214a26fbde1c5600a10db59217ae9b63a46bce9e.tar.bz2 |
Merge branch '4.8'
Conflicts:
doc/src/declarative/righttoleft.qdoc
Diffstat (limited to 'tools/qdoc3/node.cpp')
-rw-r--r-- | tools/qdoc3/node.cpp | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 56d76d3..b1d94e2 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -39,10 +39,6 @@ ** ****************************************************************************/ -/* - node.cpp -*/ - #include "node.h" #include "tree.h" #include "codemarker.h" @@ -51,6 +47,8 @@ QT_BEGIN_NAMESPACE +ExampleNodeMap ExampleNode::exampleNodeMap; + /*! \class Node \brief The Node class is a node in the Tree. @@ -307,6 +305,38 @@ QString Node::ditaXmlHref() } /*! + If this node is a QML class node, return a pointer to it. + If it is a child of a QML class node, return a pointer to + the QML class node. Otherwise, return 0; + */ +const QmlClassNode* Node::qmlClassNode() const +{ + if (isQmlNode()) { + const Node* n = this; + while (n && n->subType() != Node::QmlClass) + n = n->parent(); + if (n && n->subType() == Node::QmlClass) + return static_cast<const QmlClassNode*>(n); + } + return 0; +} + +/*! + If this node is a QML node, find its QML class node, + and return a pointer to the C++ class node from the + QML class node. That pointer will be null if the QML + class node is a component. It will be non-null if + the QML class node is a QML element. + */ +const ClassNode* Node::declarativeCppNode() const +{ + const QmlClassNode* qcn = qmlClassNode(); + if (qcn) + return qcn->classNode(); + return 0; +} + +/*! \class InnerNode */ @@ -1063,6 +1093,16 @@ QString FakeNode::subTitle() const } /*! + The constructor calls the FakeNode constructor with + \a parent, \a name, and Node::Example. + */ +ExampleNode::ExampleNode(InnerNode* parent, const QString& name) + : FakeNode(parent, name, Node::Example) +{ + // nothing +} + +/*! \class EnumNode */ @@ -1684,6 +1724,7 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue) } } +#if 0 static QString valueType(const QString &n) { if (n == "QPoint") @@ -1714,6 +1755,7 @@ static QString valueType(const QString &n) return "QDeclarativeFontValueType"; return QString(); } +#endif /*! Returns true if a QML property or attached property is |