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>
This commit is contained in:
parent
7b33bd4110
commit
b6a4545b8f
@ -682,7 +682,8 @@ void DitaXmlGenerator::generateTree()
|
||||
qdb_->generateIndex(outputDir() + QLatin1Char('/') + fileBase + ".index",
|
||||
projectUrl,
|
||||
projectDescription,
|
||||
this);
|
||||
this,
|
||||
true);
|
||||
}
|
||||
|
||||
if (!runPrepareOnly()) {
|
||||
|
@ -279,7 +279,8 @@ void HtmlGenerator::generateTree()
|
||||
qdb_->generateIndex(outputDir() + QLatin1Char('/') + fileBase + ".index",
|
||||
projectUrl,
|
||||
projectDescription,
|
||||
this);
|
||||
this,
|
||||
true);
|
||||
}
|
||||
|
||||
if (!runPrepareOnly()) {
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user