diff options
| author | Martin Smith <[email protected]> | 2013-09-09 13:08:55 +0200 |
|---|---|---|
| committer | The Qt Project <[email protected]> | 2013-09-10 16:11:15 +0200 |
| commit | 3260dfc0be3e41cec4a444b9b5841ac468332d50 (patch) | |
| tree | 92ca470f4f002c57ed5fd4a7c542f5fb545468d4 /src/tools/qdoc/qdocdatabase.cpp | |
| parent | cdc26c9316eb32c5c57ecc07ad3fb8c67c87fc35 (diff) | |
qdoc: Better use of versions of QML modules
Now qdoc doesn't use the QML module version number
when it isn't necessary. Page names are cleaner
without appending the version number to the QML
module name.
Also reduces the number of duplicate page warnings,
but this will be updated further next time.
Task-number: QTBUG-33257
Change-Id: Iba587164532bdc819523e0666f7561ac2dbd5e52
Reviewed-by: Jerome Pasion <[email protected]>
Diffstat (limited to 'src/tools/qdoc/qdocdatabase.cpp')
| -rw-r--r-- | src/tools/qdoc/qdocdatabase.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index a1e06c80207..f1a92c2eb3c 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -190,17 +190,19 @@ DocNode* QDocDatabase::findQmlModule(const QString& name) QStringList dotSplit; QStringList blankSplit = name.split(QLatin1Char(' ')); QString qmid = blankSplit[0]; + QString qmlModuleName = qmid; if (blankSplit.size() > 1) { dotSplit = blankSplit[1].split(QLatin1Char('.')); qmid += dotSplit[0]; } DocNode* dn = 0; - if (qmlModules_.contains(qmid)) - return qmlModules_.value(qmid); - dn = new DocNode(tree_->root(), name, Node::QmlModule, Node::OverviewPage); + if (qmlModules_.contains(qmlModuleName)) + return qmlModules_.value(qmlModuleName); + dn = new DocNode(tree_->root(), qmlModuleName, Node::QmlModule, Node::OverviewPage); dn->markNotSeen(); dn->setQmlModuleInfo(name); - qmlModules_.insert(qmid,dn); + qmlModules_.insert(qmlModuleName,dn); + masterMap_.insert(qmlModuleName,dn); masterMap_.insert(qmid,dn); masterMap_.insert(dn->name(),dn); return dn; @@ -923,8 +925,10 @@ const DocNode* QDocDatabase::findDocNodeByTitle(const QString& title, const Node if (j != docNodesByTitle_.constEnd() && j.key() == i.key()) { QList<Location> internalLocations; while (j != docNodesByTitle_.constEnd()) { - if (j.key() == i.key() && j.value()->url().isEmpty()) + if (j.key() == i.key() && j.value()->url().isEmpty()) { internalLocations.append(j.value()->location()); + break; // Just report one duplicate for now. + } ++j; } if (internalLocations.size() > 0) { |
