diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/htmlgenerator.cpp | 3 | ||||
-rw-r--r-- | src/tools/qdoc/qdocdatabase.cpp | 18 | ||||
-rw-r--r-- | src/tools/qdoc/qdocdatabase.h | 2 |
3 files changed, 22 insertions, 1 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 8e50857258..b534027234 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -506,6 +506,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark QString rootName = atom->string().mid(atom->string().indexOf("classes") + 7).trimmed(); generateCompactList(Generic, relative, qdb_->getCppClasses(), true, rootName); } + else if (atom->string() == "qmlbasictypes") { + generateCompactList(Generic, relative, qdb_->getQmlBasicTypes(), true, QStringLiteral("")); + } else if (atom->string() == "qmltypes") { generateCompactList(Generic, relative, qdb_->getQmlTypes(), true, QStringLiteral("")); } diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index 8f28e38431..d43fdf4970 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -908,6 +908,18 @@ NodeMap& QDocDatabase::getServiceClasses() } /*! + Construct the data structures for QML basic types, if they + have not already been constructed. Returns a reference to + the map of QML basic types. + */ +NodeMap& QDocDatabase::getQmlBasicTypes() +{ + if (nonCompatClasses_.isEmpty() && qmlBasicTypes_.isEmpty()) + processForest(&QDocDatabase::findAllClasses); + return qmlBasicTypes_; +} + +/*! Construct the data structures for obsolete things, if they have not already been constructed. Returns a reference to the map of obsolete QML types. @@ -1000,12 +1012,16 @@ void QDocDatabase::findAllClasses(InnerNode* node) serviceClasses_.insert(serviceName, *c); } } - else if ((*c)->isQmlType() && !(*c)->doc().isEmpty()) { + else if (((*c)->isQmlType() || (*c)->isQmlBasicType())&& !(*c)->doc().isEmpty()) { QString qmlTypeName = (*c)->name(); if (qmlTypeName.startsWith(QLatin1String("QML:"))) qmlClasses_.insert(qmlTypeName.mid(4),*c); else qmlClasses_.insert(qmlTypeName,*c); + + //also add to the QML basic type map + if ((*c)->isQmlBasicType()) + qmlBasicTypes_.insert(qmlTypeName,*c); } else if ((*c)->isInnerNode()) { findAllClasses(static_cast<InnerNode*>(*c)); diff --git a/src/tools/qdoc/qdocdatabase.h b/src/tools/qdoc/qdocdatabase.h index 7c398a9d51..99d1c46ca2 100644 --- a/src/tools/qdoc/qdocdatabase.h +++ b/src/tools/qdoc/qdocdatabase.h @@ -261,6 +261,7 @@ class QDocDatabase NodeMap& getQmlTypesWithObsoleteMembers(); NodeMap& getNamespaces(); NodeMap& getServiceClasses(); + NodeMap& getQmlBasicTypes(); NodeMap& getQmlTypes(); NodeMapMap& getFunctionIndex(); TextToNodeMap& getLegaleseTexts(); @@ -401,6 +402,7 @@ class QDocDatabase NodeMap qmlTypesWithObsoleteMembers_; NodeMap namespaceIndex_; NodeMap serviceClasses_; + NodeMap qmlBasicTypes_; NodeMap qmlClasses_; NodeMapMap newClassMaps_; NodeMapMap newQmlTypeMaps_; |