From b6a4545b8f8714961025dd4475e966a5f505e9eb Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 4 Oct 2013 12:52:22 +0200 Subject: qdoc: Include internal types in the index files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ Reviewed-by: Nico Vertriest Reviewed-by: Jerome Pasion --- src/tools/qdoc/qdocindexfiles.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/tools/qdoc/qdocindexfiles.cpp') 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()); -- cgit v1.2.3