diff options
Diffstat (limited to 'src/tools/qdoc/qdocindexfiles.cpp')
-rw-r--r-- | src/tools/qdoc/qdocindexfiles.cpp | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index 02508e3589..47e302dad6 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -120,7 +120,6 @@ void QDocIndexFiles::readIndexFile(const QString& path) { QFile file(path); if (file.open(QFile::ReadOnly)) { - //qDebug() << "READING:" << path; QDomDocument document; document.setContent(&file); file.close(); @@ -515,10 +514,12 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element, QString moduleName = element.attribute("module"); if (!moduleName.isEmpty()) node->setModuleName(moduleName); - if (node->isExternalPage()) - node->setUrl(href); - else if (!indexUrl.isEmpty()) - node->setUrl(indexUrl + QLatin1Char('/') + href); + if (!href.isEmpty()) { + if (node->isExternalPage()) + node->setUrl(href); + else if (!indexUrl.isEmpty()) + node->setUrl(indexUrl + QLatin1Char('/') + href); + } QString since = element.attribute("since"); if (!since.isEmpty()) { @@ -717,6 +718,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, access = "protected"; break; case Node::Private: +#if 0 // Do not include private non-internal nodes in the index. // (Internal public and protected nodes are marked as private // by qdoc. We can check their internal status to determine @@ -725,6 +727,13 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, access = "internal"; else return false; +#endif + { + access = "private"; + bool b = generateInternalNodes; + if (b) + b = false; + } break; default: return false; @@ -811,13 +820,24 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, } else href = node->name(); - writer.writeAttribute("href", href); + if (node->isQmlNode()) { + InnerNode* p = node->parent(); + if (p) { + if (p->isQmlPropertyGroup()) + p = p->parent(); + if (p && p->isQmlType() && p->isAbstract()) + href.clear(); + } + } + if (!href.isEmpty()) + 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().fileName().isEmpty()) + writer.writeAttribute("location", node->location().fileName()); if (!node->location().filePath().isEmpty()) { writer.writeAttribute("filepath", node->location().filePath()); writer.writeAttribute("lineno", QString("%1").arg(node->location().lineNo())); |