summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-09-05 10:41:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-05 11:18:59 +0200
commit3062cea229ebd10369c68f08ef4bb5aabd801d5e (patch)
treec95379bef718d8abaab1083280f634b75afa16de /src/tools
parent40925fe74ad5926981d90d378d6a822f107eec24 (diff)
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>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 2caa2f8332..52af5d60b9 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -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()) {