diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-23 18:56:59 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-23 18:56:59 (GMT) |
commit | 0be215ea57fa7bd0787d995381b24faaf23d1b7b (patch) | |
tree | 4a2977fd232abaa9d9b7058ad1389ec08090c6e5 /tools/qdoc3/tree.cpp | |
parent | e3999a4f91194b7508dbd1d3e6f595f729022ed7 (diff) | |
parent | 237b528f518f541d2f6c2ffcbaccca1a776a6f8b (diff) | |
download | Qt-0be215ea57fa7bd0787d995381b24faaf23d1b7b.zip Qt-0be215ea57fa7bd0787d995381b24faaf23d1b7b.tar.gz Qt-0be215ea57fa7bd0787d995381b24faaf23d1b7b.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (114 commits)
Fix the test of QDirIterator with NoDot and NoDotDot
Split QDir::NoDotAndDotDot into QDir::NoDot and QDir::NoDotDot
QFSFileEngine: don't look through NTFS junctions
After showing modal windows, WM_LBUTTONUP for double click is ignored.
Possible fix for missing QML properties in the qt.qhp file.
Use standard theme icons in Linguist where possible
Use more standard icons from the theme in Assistant
Use more standard icons for standard actions in Designer
Drag & drop operations wont end while using Remote Desktop sessions
_close(fd) closes the associated handle and not the other way around
Fixed locale mapping on Symbian.
Revert change 7bf4512659 on Cocoa.
Extended the high_attributes array, since we have more than 127 widget attributes now.
Added instructions for MinGW users wanting to build the MySQL driver.
Designer: Fix broken resource view.
Add missing ,.
get rid of build warning messages
Quiet unnecessary configure/qmake warnings when EPOCROOT is not set.
Add configure test for Maemo Internet Connection Daemon.
fix warning
...
Diffstat (limited to 'tools/qdoc3/tree.cpp')
-rw-r--r-- | tools/qdoc3/tree.cpp | 78 |
1 files changed, 69 insertions, 9 deletions
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 7dcc8c3..31bbf54 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -1121,6 +1121,15 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, case Node::Target: nodeName = "target"; break; + case Node::QmlProperty: + nodeName = "qmlproperty"; + break; + case Node::QmlSignal: + nodeName = "qmlsignal"; + break; + case Node::QmlMethod: + nodeName = "qmlmethod"; + break; default: return false; } @@ -1210,7 +1219,7 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, if (fullName != objName) writer.writeAttribute("fullname", fullName); writer.writeAttribute("href", fullDocumentLocation(node)); - if (node->type() != Node::Fake) + if ((node->type() != Node::Fake) && (!node->isQmlNode())) writer.writeAttribute("location", node->location().fileName()); switch (node->type()) { @@ -1265,6 +1274,12 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, case Node::ExternalPage: writer.writeAttribute("subtype", "externalpage"); break; + case Node::QmlClass: + writer.writeAttribute("subtype", "qmlclass"); + break; + case Node::QmlBasicType: + writer.writeAttribute("subtype", "qmlbasictype"); + break; default: break; } @@ -1337,6 +1352,12 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, } break; + case Node::QmlProperty: + { + const QmlPropertyNode *qpn = static_cast<const QmlPropertyNode*>(node); + writer.writeAttribute("type", qpn->dataType()); + } + break; case Node::Property: { const PropertyNode *propertyNode = static_cast<const PropertyNode*>(node); @@ -1524,9 +1545,22 @@ void Tree::generateIndexSections(QXmlStreamWriter &writer, if (node->isInnerNode()) { const InnerNode *inner = static_cast<const InnerNode *>(node); - // Recurse to write an element for this child node and all its children. - foreach (const Node *child, inner->childNodes()) - generateIndexSections(writer, child, generateInternalNodes); + foreach (const Node *child, inner->childNodes()) { + /* + Don't generate anything for a QML property group node. + It is just a place holder for a collection of QML property + nodes. Recurse to its children, which are the QML property + nodes. + */ + if (child->subType() == Node::QmlPropertyGroup) { + const InnerNode *pgn = static_cast<const InnerNode*>(child); + foreach (const Node *c, pgn->childNodes()) { + generateIndexSections(writer, c, generateInternalNodes); + } + } + else + generateIndexSections(writer, child, generateInternalNodes); + } /* foreach (const Node *child, inner->relatedNodes()) { @@ -1931,9 +1965,23 @@ QString Tree::fullDocumentLocation(const Node *node) const if ((parentNode = node->relates())) parentName = fullDocumentLocation(node->relates()); - else if ((parentNode = node->parent())) - parentName = fullDocumentLocation(node->parent()); - + else if ((parentNode = node->parent())) { + if (parentNode->subType() == Node::QmlPropertyGroup) { + parentNode = parentNode->parent(); + parentName = "qml-" + parentNode->fileBase() + ".html"; + } + else + parentName = fullDocumentLocation(node->parent()); + } +#if 0 + if (node->type() == Node::QmlProperty) { + qDebug() << "Node::QmlProperty:" << node->name() + << "parentName:" << parentName; + if (parentNode) + qDebug() << "PARENT NODE" << parentNode->type() + << parentNode->subType() << parentNode->name(); + } +#endif switch (node->type()) { case Node::Class: case Node::Namespace: @@ -1980,6 +2028,15 @@ QString Tree::fullDocumentLocation(const Node *node) const case Node::Property: anchorRef = "#" + node->name() + "-prop"; break; + case Node::QmlProperty: + anchorRef = "#" + node->name() + "-prop"; + break; + case Node::QmlSignal: + anchorRef = "#" + node->name() + "-signal"; + break; + case Node::QmlMethod: + anchorRef = "#" + node->name() + "-method"; + break; case Node::Variable: anchorRef = "#" + node->name() + "-var"; break; @@ -2019,6 +2076,8 @@ QString Tree::fullDocumentLocation(const Node *node) const } /*! + Construct the full document name for \a node and return the + name. */ QString Tree::fullDocumentName(const Node *node) const { @@ -2029,10 +2088,11 @@ QString Tree::fullDocumentName(const Node *node) const const Node *n = node; do { - if (!n->name().isEmpty()) + if (!n->name().isEmpty() && + ((n->type() != Node::Fake) || (n->subType() != Node::QmlPropertyGroup))) pieces.insert(0, n->name()); - if (n->type() == Node::Fake) + if ((n->type() == Node::Fake) && (n->subType() != Node::QmlPropertyGroup)) break; // Examine the parent node if one exists. |