diff options
| author | Jerome Pasion <[email protected]> | 2014-07-15 13:25:19 +0200 |
|---|---|---|
| committer | Jerome Pasion <[email protected]> | 2014-07-15 14:13:07 +0200 |
| commit | 0e4807455a0d9a5c2d72a2534ae069fd609c9e6c (patch) | |
| tree | 0154858b58d5e860e01aa716cbed39bc9a6d8b9f /src/tools/qdoc/qdocdatabase.cpp | |
| parent | 4aec47b1ebd25ead5775767f3e8d6b2e29fd8630 (diff) | |
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 <[email protected]>
Diffstat (limited to 'src/tools/qdoc/qdocdatabase.cpp')
| -rw-r--r-- | src/tools/qdoc/qdocdatabase.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index 8f28e384312..d43fdf49705 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)); |
