qdoc: Now lists variable in namespaces
qdoc never did list variables declared in a namespace. It was probably an oversight, because there are currently no uses of the \variable command in namespaces. But recently a developer tried to use \variable to document a namespace variable, and it didn't work. This update corrects that problem. Task-number: QTBUG-38734 Change-Id: I47b6234f2bafbb73dfb755a2ad82c9596a4489b1 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
parent
d11530c2a1
commit
47b898cdaf
@ -750,6 +750,16 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
|
||||
style == Detailed ? "types" : QString(),
|
||||
"type",
|
||||
"types");
|
||||
FastSection variables(inner,
|
||||
style == Summary ? "Variables" : "Variable Documentation",
|
||||
style == Detailed ? "vars" : QString(),
|
||||
"variable",
|
||||
"variables");
|
||||
FastSection staticVariables(inner,
|
||||
"Static Variables",
|
||||
QString(),
|
||||
"static variable",
|
||||
"static variables");
|
||||
FastSection functions(inner,
|
||||
style == Summary ?
|
||||
"Functions" : "Function Documentation",
|
||||
@ -788,14 +798,27 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
|
||||
insert(functions, *n, style, status);
|
||||
}
|
||||
break;
|
||||
case Node::Variable:
|
||||
{
|
||||
const VariableNode* var = static_cast<const VariableNode*>(*n);
|
||||
if (!var->doc().isEmpty()) {
|
||||
if (var->isStatic())
|
||||
insert(staticVariables,*n,style,status);
|
||||
else
|
||||
insert(variables, *n, style, status);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
;
|
||||
break;
|
||||
}
|
||||
++n;
|
||||
}
|
||||
append(sections, namespaces);
|
||||
append(sections, classes);
|
||||
append(sections, types);
|
||||
append(sections, variables);
|
||||
append(sections, staticVariables);
|
||||
append(sections, functions);
|
||||
append(sections, macros);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user