QDoc: Allow QDoc to collect all QML basic types in a map.
-needed if a list of just QML basic types is needed. -adding QML basic types to map of QML types. -generating the list of "qmlbasictypes" also now supported. -part of the fix for QTBUG-32871 Change-Id: Id291982a5684645b2b5e75256be673c1701e60b1 Task-number: QTBUG-32871 Reviewed-by: Martin Smith <martin.smith@digia.com>bb10
parent
4aec47b1eb
commit
0e4807455a
|
|
@ -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(""));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -907,6 +907,18 @@ NodeMap& QDocDatabase::getServiceClasses()
|
|||
return serviceClasses_;
|
||||
}
|
||||
|
||||
/*!
|
||||
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
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue