summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/htmlgenerator.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2013-09-23 14:22:59 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-24 14:33:00 +0200
commita252f434e668acdec5b98688905d2ef75cc3eb3a (patch)
tree8c83312c944315c19afc0acb71752db8a6d7c682 /src/tools/qdoc/htmlgenerator.cpp
parent458837ba0978acbbb8905b71ab605ef184cdf85d (diff)
qdoc: Import statement now shows correct version
The Import statement shown at the top of each QML type page now always gets the version number from the QML module page for the QML type's module. Task-number: QTBUG-32153 Change-Id: I57649c07ea680806bc92ad62fb3bc4d4fb56f717 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/htmlgenerator.cpp')
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index ac10bb94e3..4a6d5ea9a8 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -1998,10 +1998,16 @@ void HtmlGenerator::generateQmlRequisites(QmlClassNode *qcn, CodeMarker *marker)
<< inheritedBytext;
//add the module name and version to the map
+ QString qmlModuleVersion;
+ DocNode* dn = qdb_->findQmlModule(qcn->qmlModuleName());
+ if (dn)
+ qmlModuleVersion = dn->qmlModuleVersion();
+ else
+ qmlModuleVersion = qcn->qmlModuleVersion();
text.clear();
text << formattingRightMap()[ATOM_FORMATTING_BOLD]
<< formattingLeftMap()[ATOM_FORMATTING_TELETYPE]
- << "import " + qcn->qmlModuleName() + " " + qcn->qmlModuleVersion()
+ << "import " + qcn->qmlModuleName() + " " + qmlModuleVersion
<< formattingRightMap()[ATOM_FORMATTING_TELETYPE];
requisites.insert(importText, text);