diff options
author | Martin Smith <martin.smith@digia.com> | 2013-10-04 12:52:22 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-01 14:52:47 +0100 |
commit | b6a4545b8f8714961025dd4475e966a5f505e9eb (patch) | |
tree | 9e3527d9ad2976596194e006978105a5f17a498d | |
parent | 7b33bd411061b021c6a6d68f64dfac205a4e65ac (diff) |
qdoc: Include internal types in the index files
Internal types can be inherited. Documentation is not created for
internal types, but if an internal type is abstract, its properties
must be listed on the documentation page of each subtype that inherits
the internal type. This fix includes internal types in the index file.
Task-number: QTBUG-33814
Change-Id: Ib6ef7cbd92804b3c605009802ddb15d35b32692c
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r-- | src/tools/qdoc/ditaxmlgenerator.cpp | 3 | ||||
-rw-r--r-- | src/tools/qdoc/htmlgenerator.cpp | 3 | ||||
-rw-r--r-- | src/tools/qdoc/qdocindexfiles.cpp | 14 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp index 095e3c9d30..e3b9bdd264 100644 --- a/src/tools/qdoc/ditaxmlgenerator.cpp +++ b/src/tools/qdoc/ditaxmlgenerator.cpp @@ -682,7 +682,8 @@ void DitaXmlGenerator::generateTree() qdb_->generateIndex(outputDir() + QLatin1Char('/') + fileBase + ".index", projectUrl, projectDescription, - this); + this, + true); } if (!runPrepareOnly()) { diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 2387502b8a..a7dd6666db 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -279,7 +279,8 @@ void HtmlGenerator::generateTree() qdb_->generateIndex(outputDir() + QLatin1Char('/') + fileBase + ".index", projectUrl, projectDescription, - this); + this, + true); } if (!runPrepareOnly()) { diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index 7424971b13..c84caa7eb5 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -196,6 +196,10 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element, location = Location(indexUrl + QLatin1Char('/') + name.toLower() + ".html"); else if (!indexUrl.isNull()) location = Location(name.toLower() + ".html"); + bool abstract = false; + if (element.attribute("abstract") == "true") + abstract = true; + node->setAbstract(abstract); } else if ((element.nodeName() == "qmlclass") || ((element.nodeName() == "page") && (element.attribute("subtype") == "qmlclass"))) { @@ -204,6 +208,10 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element, QString qmlModuleName = element.attribute("qml-module-name"); if (!qmlModuleName.isEmpty()) qdb_->addToQmlModule(qmlModuleName, qcn); + bool abstract = false; + if (element.attribute("abstract") == "true") + abstract = true; + qcn->setAbstract(abstract); QString qmlFullBaseName = element.attribute("qml-base-type"); if (!qmlFullBaseName.isEmpty()) qcn->setQmlBaseName(qmlFullBaseName); @@ -729,7 +737,6 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, writer.writeStartElement(nodeName); QXmlStreamAttributes attributes; - writer.writeAttribute("access", access); if (node->type() != Node::Document) { QString threadSafety; @@ -776,7 +783,6 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, status = "main"; break; } - writer.writeAttribute("status", status); writer.writeAttribute("name", objName); if (node->isQmlModule()) { @@ -806,6 +812,10 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, href = node->name(); writer.writeAttribute("href", href); + writer.writeAttribute("access", access); + writer.writeAttribute("status", status); + if (node->isAbstract()) + writer.writeAttribute("abstract", "true"); writer.writeAttribute("location", node->location().fileName()); if (!node->location().filePath().isEmpty()) { writer.writeAttribute("filepath", node->location().filePath()); |