summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2015-08-03 13:32:06 +0200
committerTopi Reiniƶ <topi.reinio@digia.com>2015-08-04 14:15:39 +0000
commit1e39c712bd726e9ef426ecc316edad58d134decf (patch)
treec9570b451136c43b889c2f0bbf78caa4912751fc /src/tools
parentabbf82bdfcf0a233553cceb73d4cff56b6cd273d (diff)
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>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index b0f1758a84..5f2a61bb76 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -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);
}