diff options
Diffstat (limited to 'src/tools/qdoc/node.cpp')
-rw-r--r-- | src/tools/qdoc/node.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index 03b798cbb3..f16c35c3a9 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -1339,6 +1339,27 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n) const } /*! + If this node has a child that is a QML property named \a n + whose type (attached or normal property) matches \a attached, + return the pointer to that child. + */ +QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) const +{ + foreach (Node* child, childNodes()) { + if (child->type() == Node::QmlProperty) { + if (child->name() == n && child->isAttached() == attached) + return static_cast<QmlPropertyNode*>(child); + } + else if (child->isQmlPropertyGroup()) { + QmlPropertyNode* t = child->hasQmlProperty(n, attached); + if (t) + return t; + } + } + return 0; +} + +/*! \class LeafNode */ @@ -2797,7 +2818,10 @@ QString Node::idForNode() const str = "qml-module-" + name(); break; case Node::QmlProperty: - str = "qml-property-" + name(); + if (isAttached()) + str = "qml-attached-property-" + name(); + else + str = "qml-property-" + name(); break; case Node::QmlPropertyGroup: { |