summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/tree.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-29 07:09:54 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-29 07:43:30 (GMT)
commit0eaa3466077839b0cef2ad6c326d80f398eccae7 (patch)
tree4c6855559ec940e2ac87514d14a0573593247915 /tools/qdoc3/tree.cpp
parenta45fe18569be1fc91e26f6e58d2f16bc8c6958de (diff)
downloadQt-0eaa3466077839b0cef2ad6c326d80f398eccae7.zip
Qt-0eaa3466077839b0cef2ad6c326d80f398eccae7.tar.gz
Qt-0eaa3466077839b0cef2ad6c326d80f398eccae7.tar.bz2
Merge QML specific qdoc changes
Reviewed-by: Martin Smith
Diffstat (limited to 'tools/qdoc3/tree.cpp')
-rw-r--r--tools/qdoc3/tree.cpp52
1 files changed, 32 insertions, 20 deletions
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 308ba0e..e6dd084 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -176,6 +176,8 @@ const Node *Tree::findNode(const QStringList &path,
}
/*!
+ Find the node with the specified \a path name of the
+ specified \a type.
*/
Node *Tree::findNode(const QStringList &path,
Node::Type type,
@@ -189,6 +191,8 @@ Node *Tree::findNode(const QStringList &path,
}
/*!
+ Find the node with the specified \a path name of the
+ specified \a type.
*/
const Node *Tree::findNode(const QStringList &path,
Node::Type type,
@@ -208,7 +212,9 @@ FunctionNode *Tree::findFunctionNode(const QStringList& path,
int findFlags)
{
return const_cast<FunctionNode *>(
- const_cast<const Tree *>(this)->findFunctionNode(path, relative, findFlags));
+ const_cast<const Tree *>(this)->findFunctionNode(path,
+ relative,
+ findFlags));
}
/*!
@@ -233,7 +239,8 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
else
next = ((InnerNode *) node)->findNode(path.at(i));
- if (!next && node->type() == Node::Class && (findFlags & SearchBaseClasses)) {
+ if (!next && node->type() == Node::Class &&
+ (findFlags & SearchBaseClasses)) {
NodeList baseClasses = allBaseClasses(static_cast<const ClassNode *>(node));
foreach (const Node *baseClass, baseClasses) {
if (i == path.size() - 1)
@@ -563,7 +570,7 @@ void Tree::resolveGroups()
FakeNode *fake =
static_cast<FakeNode*>(findNode(QStringList(i.key()),Node::Fake));
- if (fake && fake->subType() == FakeNode::Group) {
+ if (fake && fake->subType() == Node::Group) {
fake->addGroupMember(i.value());
}
else {
@@ -770,21 +777,21 @@ void Tree::readIndexSection(const QDomElement &element,
}
else if (element.nodeName() == "page") {
- FakeNode::SubType subtype;
+ Node::SubType subtype;
if (element.attribute("subtype") == "example")
- subtype = FakeNode::Example;
+ subtype = Node::Example;
else if (element.attribute("subtype") == "header")
- subtype = FakeNode::HeaderFile;
+ subtype = Node::HeaderFile;
else if (element.attribute("subtype") == "file")
- subtype = FakeNode::File;
+ subtype = Node::File;
else if (element.attribute("subtype") == "group")
- subtype = FakeNode::Group;
+ subtype = Node::Group;
else if (element.attribute("subtype") == "module")
- subtype = FakeNode::Module;
+ subtype = Node::Module;
else if (element.attribute("subtype") == "page")
- subtype = FakeNode::Page;
+ subtype = Node::Page;
else if (element.attribute("subtype") == "externalpage")
- subtype = FakeNode::ExternalPage;
+ subtype = Node::ExternalPage;
else
return;
@@ -1226,25 +1233,25 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer,
const FakeNode *fakeNode = static_cast<const FakeNode*>(node);
switch (fakeNode->subType()) {
- case FakeNode::Example:
+ case Node::Example:
writer.writeAttribute("subtype", "example");
break;
- case FakeNode::HeaderFile:
+ case Node::HeaderFile:
writer.writeAttribute("subtype", "header");
break;
- case FakeNode::File:
+ case Node::File:
writer.writeAttribute("subtype", "file");
break;
- case FakeNode::Group:
+ case Node::Group:
writer.writeAttribute("subtype", "group");
break;
- case FakeNode::Module:
+ case Node::Module:
writer.writeAttribute("subtype", "module");
break;
- case FakeNode::Page:
+ case Node::Page:
writer.writeAttribute("subtype", "page");
break;
- case FakeNode::ExternalPage:
+ case Node::ExternalPage:
writer.writeAttribute("subtype", "externalpage");
break;
default:
@@ -1383,7 +1390,7 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer,
bool external = false;
if (inner->type() == Node::Fake) {
const FakeNode *fakeNode = static_cast<const FakeNode *>(inner);
- if (fakeNode->subType() == FakeNode::ExternalPage)
+ if (fakeNode->subType() == Node::ExternalPage)
external = true;
}
@@ -1863,7 +1870,7 @@ void Tree::generateTagFile(const QString &fileName) const
*/
void Tree::addExternalLink(const QString &url, const Node *relative)
{
- FakeNode *fakeNode = new FakeNode(root(), url, FakeNode::ExternalPage);
+ FakeNode *fakeNode = new FakeNode(root(), url, Node::ExternalPage);
fakeNode->setAccess(Node::Public);
// Create some content for the node.
@@ -1898,6 +1905,11 @@ QString Tree::fullDocumentLocation(const Node *node) const
return "";
}
else if (node->type() == Node::Fake) {
+#ifdef QDOC_QML
+ if (node->subType() == Node::QmlClass)
+ return "qml-" + node->fileBase() + ".html";
+ else
+#endif
parentName = node->fileBase() + ".html";
}
else if (node->fileBase().isEmpty())