diff options
author | David Boddie <david.boddie@nokia.com> | 2011-02-03 20:05:16 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-02-03 20:05:16 (GMT) |
commit | 5ee75c4a483405180788b5a4986dce2cf9360d86 (patch) | |
tree | 7e717ff0167ef9332a37e224ff6b91019db29cda /tools/qdoc3/helpprojectwriter.cpp | |
parent | 74ad5ce57adedc91717ffd67e3e65b8f76d12052 (diff) | |
download | Qt-5ee75c4a483405180788b5a4986dce2cf9360d86.zip Qt-5ee75c4a483405180788b5a4986dce2cf9360d86.tar.gz Qt-5ee75c4a483405180788b5a4986dce2cf9360d86.tar.bz2 |
Added a configuration variable for the QML documentation file prefix.
This required a certain amount of refactoring to make the new
variable visible to the relevant parts of the code. I also moved
the fullDocumentLocation() function into the HtmlGenerator class,
where it belongs.
Task-number: QTBUG-17071
Diffstat (limited to 'tools/qdoc3/helpprojectwriter.cpp')
-rw-r--r-- | tools/qdoc3/helpprojectwriter.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 386ce20..f2e2f04 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -214,7 +214,7 @@ QStringList HelpProjectWriter::keywordDetails(const Node *node) const details << node->name(); details << node->name(); } - details << tree->fullDocumentLocation(node); + details << HtmlGenerator::fullDocumentLocation(node); return details; } @@ -274,12 +274,12 @@ bool HelpProjectWriter::generateSection(HelpProject &project, case Node::Class: project.keywords.append(keywordDetails(node)); - project.files.insert(tree->fullDocumentLocation(node)); + project.files.insert(HtmlGenerator::fullDocumentLocation(node)); break; case Node::Namespace: project.keywords.append(keywordDetails(node)); - project.files.insert(tree->fullDocumentLocation(node)); + project.files.insert(HtmlGenerator::fullDocumentLocation(node)); break; case Node::Enum: @@ -299,7 +299,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, details << item.name(); // "name" details << item.name(); // "id" } - details << tree->fullDocumentLocation(node); + details << HtmlGenerator::fullDocumentLocation(node); project.keywords.append(details); } } @@ -330,7 +330,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, if (node->relates()) { project.memberStatus[node->relates()].insert(node->status()); - project.files.insert(tree->fullDocumentLocation(node->relates())); + project.files.insert(HtmlGenerator::fullDocumentLocation(node->relates())); } else if (node->parent()) project.memberStatus[node->parent()].insert(node->status()); } @@ -344,7 +344,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, // Use the location of any associated enum node in preference // to that of the typedef. if (enumNode) - typedefDetails[2] = tree->fullDocumentLocation(enumNode); + typedefDetails[2] = HtmlGenerator::fullDocumentLocation(enumNode); project.keywords.append(typedefDetails); } @@ -364,11 +364,11 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QStringList details; details << keyword->string() << keyword->string() - << tree->fullDocumentLocation(node) + "#" + Doc::canonicalTitle(keyword->string()); + << HtmlGenerator::fullDocumentLocation(node) + "#" + Doc::canonicalTitle(keyword->string()); project.keywords.append(details); } else fakeNode->doc().location().warning( - tr("Bad keyword in %1").arg(tree->fullDocumentLocation(node)) + tr("Bad keyword in %1").arg(HtmlGenerator::fullDocumentLocation(node)) ); } } @@ -382,16 +382,16 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QStringList details; details << title << title - << tree->fullDocumentLocation(node) + "#" + Doc::canonicalTitle(title); + << HtmlGenerator::fullDocumentLocation(node) + "#" + Doc::canonicalTitle(title); project.keywords.append(details); } else fakeNode->doc().location().warning( - tr("Bad contents item in %1").arg(tree->fullDocumentLocation(node)) + tr("Bad contents item in %1").arg(HtmlGenerator::fullDocumentLocation(node)) ); } } */ - project.files.insert(tree->fullDocumentLocation(node)); + project.files.insert(HtmlGenerator::fullDocumentLocation(node)); } break; } @@ -470,7 +470,7 @@ void HelpProjectWriter::generate(const Tree *tre) void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer, const Node *node) { - QString href = tree->fullDocumentLocation(node); + QString href = HtmlGenerator::fullDocumentLocation(node); QString objName = node->name(); switch (node->type()) { @@ -613,12 +613,12 @@ void HelpProjectWriter::generateProject(HelpProject &project) writer.writeStartElement("toc"); writer.writeStartElement("section"); - QString indexPath = tree->fullDocumentLocation(tree->findFakeNodeByTitle(project.indexTitle)); + QString indexPath = HtmlGenerator::fullDocumentLocation(tree->findFakeNodeByTitle(project.indexTitle)); if (indexPath.isEmpty()) indexPath = "index.html"; writer.writeAttribute("ref", HtmlGenerator::cleanRef(indexPath)); writer.writeAttribute("title", project.indexTitle); - project.files.insert(tree->fullDocumentLocation(rootNode)); + project.files.insert(HtmlGenerator::fullDocumentLocation(rootNode)); generateSections(project, writer, rootNode); @@ -656,7 +656,7 @@ void HelpProjectWriter::generateProject(HelpProject &project) const FakeNode *page = tree->findFakeNodeByTitle(atom->string()); writer.writeStartElement("section"); - QString indexPath = tree->fullDocumentLocation(page); + QString indexPath = HtmlGenerator::fullDocumentLocation(page); writer.writeAttribute("ref", HtmlGenerator::cleanRef(indexPath)); writer.writeAttribute("title", atom->string()); project.files.insert(indexPath); @@ -681,7 +681,7 @@ void HelpProjectWriter::generateProject(HelpProject &project) if (!name.isEmpty()) { writer.writeStartElement("section"); - QString indexPath = tree->fullDocumentLocation(tree->findFakeNodeByTitle(subproject.indexTitle)); + QString indexPath = HtmlGenerator::fullDocumentLocation(tree->findFakeNodeByTitle(subproject.indexTitle)); writer.writeAttribute("ref", HtmlGenerator::cleanRef(indexPath)); writer.writeAttribute("title", subproject.title); project.files.insert(indexPath); |