From 696a18b063a890c4425121a6011d6fd5ba1c3f00 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 24 Mar 2015 11:57:58 +0100 Subject: qdoc: No internal qmlabstract types in the "inherited by" list This update ensures that there are no internal QML types in a QML type's "inherited by" list. It also fixes a bug that caused the "inherited by" lists to be empty when running qdoc in the single-exec mode. Change-Id: Iee8b9dbcd56a09b7a49ec8a703b5d861f0b1f0ec Task-number: QTBUG-44004 Reviewed-by: Martin Smith --- src/tools/qdoc/generator.cpp | 1 - src/tools/qdoc/htmlgenerator.cpp | 4 ++-- src/tools/qdoc/main.cpp | 1 + src/tools/qdoc/node.cpp | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp index 70ade3aabd..af6cdf7bd1 100644 --- a/src/tools/qdoc/generator.cpp +++ b/src/tools/qdoc/generator.cpp @@ -1937,7 +1937,6 @@ void Generator::terminate() imageFiles.clear(); imageDirs.clear(); outDir_.clear(); - QmlTypeNode::terminate(); } void Generator::terminateGenerator() diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 8bc910e6a6..0fc9a30836 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -2247,9 +2247,9 @@ void HtmlGenerator::generateQmlRequisites(QmlTypeNode *qcn, CodeMarker *marker) QString logicalModuleVersion; CollectionNode* collection = 0; if (qcn->isJsNode()) - qdb_->findJsModule(qcn->logicalModuleName()); + collection = qdb_->findJsModule(qcn->logicalModuleName()); else - qdb_->findQmlModule(qcn->logicalModuleName()); + collection = qdb_->findQmlModule(qcn->logicalModuleName()); if (collection) logicalModuleVersion = collection->logicalModuleVersion(); else diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 825358c354..0b156c6bb9 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -775,6 +775,7 @@ int main(int argc, char **argv) } translators.clear(); #endif + QmlTypeNode::terminate(); #ifdef DEBUG_SHUTDOWN_CRASH qDebug() << "main(): Delete qdoc database"; diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index 92a7c7b1df..8e094f38c4 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -2124,9 +2124,10 @@ void QmlTypeNode::terminate() */ void QmlTypeNode::addInheritedBy(const QString& base, Node* sub) { - if (inheritedBy.constFind(base,sub) == inheritedBy.constEnd()) { + if (sub->isInternal()) + return; + if (inheritedBy.constFind(base,sub) == inheritedBy.constEnd()) inheritedBy.insert(base,sub); - } } /*! -- cgit v1.2.3