diff options
author | Martin Smith <martin.smith@nokia.com> | 2010-11-11 14:07:30 (GMT) |
---|---|---|
committer | Martin Smith <martin.smith@nokia.com> | 2010-11-11 14:07:30 (GMT) |
commit | 76d9e79d1faf174a7052b197b0fe92425bb85f3a (patch) | |
tree | b0ea8f2b8c07029597ef1e1738d8db1428932031 /tools | |
parent | 6315183497eee1867c7ed899c6ea22fb66a4cfed (diff) | |
download | Qt-76d9e79d1faf174a7052b197b0fe92425bb85f3a.zip Qt-76d9e79d1faf174a7052b197b0fe92425bb85f3a.tar.gz Qt-76d9e79d1faf174a7052b197b0fe92425bb85f3a.tar.bz2 |
qdoc: Added QML Elements to the Assistant index
Task-number: QTBUG-15081
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/helpprojectwriter.cpp | 16 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-build-docs.qdocconf | 8 | ||||
-rw-r--r-- | tools/qdoc3/test/qt.qdocconf | 6 |
3 files changed, 20 insertions, 10 deletions
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 98246c4..63e8df7 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -49,6 +49,7 @@ #include "config.h" #include "node.h" #include "tree.h" +#include <qdebug.h> QT_BEGIN_NAMESPACE @@ -250,8 +251,9 @@ bool HelpProjectWriter::generateSection(HelpProject &project, foreach (const QString &name, project.subprojects.keys()) { SubProject subproject = project.subprojects[name]; // No selectors: accept all nodes. - if (subproject.selectors.isEmpty()) + if (subproject.selectors.isEmpty()) { project.subprojects[name].nodes[objName] = node; + } else if (subproject.selectors.contains(node->type())) { // Accept only the node types in the selectors hash. if (node->type() != Node::Fake) @@ -262,9 +264,10 @@ bool HelpProjectWriter::generateSection(HelpProject &project, const FakeNode *fakeNode = static_cast<const FakeNode *>(node); if (subproject.selectors[node->type()].contains(fakeNode->subType()) && fakeNode->subType() != Node::ExternalPage && - !fakeNode->fullTitle().isEmpty()) + !fakeNode->fullTitle().isEmpty()) { project.subprojects[name].nodes[objName] = node; + } } } } @@ -527,13 +530,11 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer writer.writeStartElement("section"); writer.writeAttribute("ref", href); writer.writeAttribute("title", fakeNode->fullTitle()); - // qDebug() << "Title:" << fakeNode->fullTitle(); - if (fakeNode->subType() == Node::HeaderFile) { - + if ((fakeNode->subType() == Node::HeaderFile) || (fakeNode->subType() == Node::QmlClass)) { // Write subsections for all members, obsolete members and Qt 3 // members. - if (!project.memberStatus[node].isEmpty()) { + if (!project.memberStatus[node].isEmpty() || (fakeNode->subType() == Node::QmlClass)) { QString membersPath = href.left(href.size()-5) + "-members.html"; writer.writeStartElement("section"); writer.writeAttribute("ref", membersPath); @@ -690,8 +691,9 @@ void HelpProjectWriter::generateProject(HelpProject &project) if (subproject.sortPages) { QStringList titles = subproject.nodes.keys(); titles.sort(); - foreach (const QString &title, titles) + foreach (const QString &title, titles) { writeNode(project, writer, subproject.nodes[title]); + } } else { // Find a contents node and navigate from there, using the NextLink values. foreach (const Node *node, subproject.nodes) { diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index dcabeb4..358f17f 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -62,11 +62,15 @@ qhp.Qt.extraFiles = index.html \ qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.1 qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 -qhp.Qt.subprojects = classes overviews examples +qhp.Qt.subprojects = classes qmlelements overviews examples qhp.Qt.subprojects.classes.title = Classes -qhp.Qt.subprojects.classes.indexTitle = Qt's Classes +qhp.Qt.subprojects.classes.indexTitle = All Classes qhp.Qt.subprojects.classes.selectors = class fake:headerfile qhp.Qt.subprojects.classes.sortPages = true +qhp.Qt.subprojects.qmlelements.title = QML Elements +qhp.Qt.subprojects.qmlelements.indexTitle = QML Elements +qhp.Qt.subprojects.qmlelements.selectors = fake:qmlclass +qhp.Qt.subprojects.qmlelements.sortPages = true qhp.Qt.subprojects.overviews.title = Overviews qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs qhp.Qt.subprojects.overviews.selectors = fake:page,group,module diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index ea97205..947beb2 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -62,11 +62,15 @@ qhp.Qt.extraFiles = index.html \ qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.1 qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 -qhp.Qt.subprojects = classes overviews examples +qhp.Qt.subprojects = classes qmlelements overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes qhp.Qt.subprojects.classes.selectors = class fake:headerfile qhp.Qt.subprojects.classes.sortPages = true +qhp.Qt.subprojects.qmlelements.title = QML Elements +qhp.Qt.subprojects.qmlelements.indexTitle = QML Elements +qhp.Qt.subprojects.qmlelements.selectors = fake:qmlclass +qhp.Qt.subprojects.qmlelements.sortPages = true qhp.Qt.subprojects.overviews.title = Overviews qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs qhp.Qt.subprojects.overviews.selectors = fake:page,group,module |