diff options
author | Martin Smith <martin.smith@digia.com> | 2013-03-20 13:26:09 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-22 12:13:23 +0100 |
commit | 04770e5824cbde365e935b47bd287a9a81fff6f9 (patch) | |
tree | 0aa5143788476f1e4eec78df9246fd01c0787a49 /src/tools/qdoc/htmlgenerator.cpp | |
parent | bf3a5ccef13d568662f027be62280aba1f73bada (diff) |
qdoc: List of all members subpage redesigned
The subpage listing all the members of a QML type,
including the inherited members, was trying to use
an old format that works ok for C++ classes but is
not optimal for QML types.
The redesigned format for QML types still lists all
the members but it lists the members for each base
type in a separate list.
The members for a QML type that has been marked as
abstract are listed with the members of the type
that inherits the abstract type.
This fix does not fix QTBUG-30111, which will be
fixed in a separate commit. This means that some
links on the subpage generated by this change
will be links to a page that doesn't actually
contain any documentation for the linked member.
But it will eventually.
Task-number: QTBUG-30114
Change-Id: I8ae4227d1eaecdbc24a4ac9b8119f0ced2cdee92
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/htmlgenerator.cpp')
-rw-r--r-- | src/tools/qdoc/htmlgenerator.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 69d1a69d31..7d7f9e811a 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -2067,8 +2067,38 @@ QString HtmlGenerator::generateAllQmlMembersFile(const QmlClassNode* qml_cn, generateFullName(qml_cn, 0); out() << ", including inherited members.</p>\n"; - Section section = sections.first(); - generateSectionList(section, 0, marker, CodeMarker::Subpage); + ClassKeysNodesList& cknl = sections.first().classKeysNodesList_; + if (!cknl.isEmpty()) { + for (int i=0; i<cknl.size(); i++) { + ClassKeysNodes* ckn = cknl[i]; + const QmlClassNode* qcn = ckn->first; + KeysAndNodes& kn = ckn->second; + QStringList& keys = kn.first; + NodeList& nodes = kn.second; + if (nodes.isEmpty()) + continue; + if (i != 0) { + out() << "<p>The following members are inherited from "; + generateFullName(qcn,0); + out() << ".</p>\n"; + } + out() << "<ul>\n"; + for (int j=0; j<keys.size(); j++) { + if (nodes[j]->access() == Node::Private) { + continue; + } + out() << "<li class=\"fn\">"; + QString prefix; + if (!keys.isEmpty()) { + prefix = keys.at(j).mid(1); + prefix = prefix.left(keys.at(j).indexOf("::")+1); + } + generateSynopsis(nodes[j], qcn, marker, CodeMarker::Summary, false, &prefix); + out() << "</li>\n"; + } + out() << "</ul>\n"; + } + } generateFooter(); endSubPage(); |