Doc: Get QDoc to list the QT variable for namespaces.
Task-number: QTBUG-32172 Change-Id: Id774b5d5036661a6f6b56b9c68f089031288eacc Reviewed-by: Martin Smith <martin.smith@digia.com>bb10
parent
40925fe74a
commit
3062cea229
|
|
@ -1886,7 +1886,20 @@ void HtmlGenerator::generateRequisites(InnerNode *inner, CodeMarker *marker)
|
|||
requisites.insert(sinceText, text);
|
||||
}
|
||||
|
||||
//add the instantiated-by to the map if the class node is not internal
|
||||
if (inner->type() == Node::Class || inner->type() == Node::Namespace) {
|
||||
//add the QT variable to the map
|
||||
if (!inner->moduleName().isEmpty()) {
|
||||
DocNode * moduleNode = qdb_->findModule(inner->moduleName());
|
||||
if (moduleNode && !moduleNode->qtVariable().isEmpty()) {
|
||||
text.clear();
|
||||
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_TELETYPE)
|
||||
<< "QT += " + moduleNode->qtVariable()
|
||||
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_TELETYPE);
|
||||
requisites.insert(qtVariableText, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (inner->type() == Node::Class) {
|
||||
ClassNode* classe = static_cast<ClassNode*>(inner);
|
||||
if (classe->qmlElement() != 0 && classe->status() != Node::Internal) {
|
||||
|
|
@ -1933,18 +1946,6 @@ void HtmlGenerator::generateRequisites(InnerNode *inner, CodeMarker *marker)
|
|||
text << Atom::ParaRight;
|
||||
requisites.insert(inheritedBytext, text);
|
||||
}
|
||||
|
||||
//add the QT variable to the map
|
||||
if (!classe->moduleName().isEmpty()) {
|
||||
DocNode * moduleNode = qdb_->findModule(classe->moduleName());
|
||||
if (moduleNode && !moduleNode->qtVariable().isEmpty()) {
|
||||
text.clear();
|
||||
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_TELETYPE)
|
||||
<< "QT += " + moduleNode->qtVariable()
|
||||
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_TELETYPE);
|
||||
requisites.insert(qtVariableText, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!requisites.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue