From a252f434e668acdec5b98688905d2ef75cc3eb3a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 23 Sep 2013 14:22:59 +0200 Subject: [PATCH] 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 --- src/tools/qdoc/htmlgenerator.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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);