qdoc: Do not merge QML module nodes with different major versions
As we may have multiple versions of a QML module present in the doc build, the logic QDoc uses for merging collection nodes from different trees needs to be revised a bit. After this change, the collection nodes for identically-named QML and JS modules are merged only if the major version number matches. This prevents the situation where QML types for both versions are listed in QML module pages. Change-Id: I76b056a2073744347b160b25ed5bb043279f2b8a Task-number: QTBUG-47536 Reviewed-by: Martin Smith <martin.smith@digia.com>
This commit is contained in:
parent
abbf82bdfc
commit
1e39c712bd
@ -1579,6 +1579,13 @@ void QDocDatabase::mergeCollections(Node::Genus genus, CNMap& cnm, const Node* r
|
||||
if (values.size() > 1) {
|
||||
foreach (CollectionNode* v, values) {
|
||||
if (v != n) {
|
||||
// Allow multiple (major) versions of QML/JS modules
|
||||
if (n->type() == Node::QmlModule
|
||||
&& n->logicalModuleIdentifier() != v->logicalModuleIdentifier()) {
|
||||
if (v->wasSeen() && v != relative && !v->members().isEmpty())
|
||||
cnm.insert(v->fullTitle().toLower(), v);
|
||||
continue;
|
||||
}
|
||||
foreach (Node* t, v->members())
|
||||
n->addMember(t);
|
||||
}
|
||||
@ -1599,12 +1606,19 @@ void QDocDatabase::mergeCollections(Node::Genus genus, CNMap& cnm, const Node* r
|
||||
Finds all the collection nodes with the same name
|
||||
and genus as \a c and merges their members into the
|
||||
members list of \a c.
|
||||
|
||||
For QML and JS modules, the merge is done only if
|
||||
the module identifier matches between the nodes, to avoid
|
||||
merging modules with different (major) versions.
|
||||
*/
|
||||
void QDocDatabase::mergeCollections(CollectionNode* c)
|
||||
{
|
||||
foreach (Tree* t, searchOrder()) {
|
||||
CollectionNode* cn = t->getCollection(c->name(), c->genus());
|
||||
if (cn && cn != c) {
|
||||
if (cn->type() == Node::QmlModule
|
||||
&& cn->logicalModuleIdentifier() != c->logicalModuleIdentifier())
|
||||
continue;
|
||||
foreach (Node* n, cn->members())
|
||||
c->addMember(n);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user