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>
This commit is contained in:
parent
458837ba09
commit
a252f434e6
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user