summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Smith <[email protected]>2013-10-04 12:52:22 +0200
committerThe Qt Project <[email protected]>2013-11-01 14:52:47 +0100
commitb6a4545b8f8714961025dd4475e966a5f505e9eb (patch)
tree9e3527d9ad2976596194e006978105a5f17a498d /src
parent7b33bd411061b021c6a6d68f64dfac205a4e65ac (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ƶ <[email protected]> Reviewed-by: Nico Vertriest <[email protected]> Reviewed-by: Jerome Pasion <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp3
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp3
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp14
3 files changed, 16 insertions, 4 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 095e3c9d30b..e3b9bdd2641 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 2387502b8a0..a7dd6666db9 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 7424971b13a..c84caa7eb5c 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());