diff options
Diffstat (limited to 'src/tools/qdoc/cppcodemarker.cpp')
-rw-r--r-- | src/tools/qdoc/cppcodemarker.cpp | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp index 64b11109f7..60c7142229 100644 --- a/src/tools/qdoc/cppcodemarker.cpp +++ b/src/tools/qdoc/cppcodemarker.cpp @@ -629,7 +629,8 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, QList<RelatedClass>::ConstIterator r = ancestorClass->baseClasses().constBegin(); while (r != ancestorClass->baseClasses().constEnd()) { - stack.prepend((*r).node); + if ((*r).node_) + stack.prepend((*r).node_); ++r; } } @@ -724,7 +725,8 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner, QList<RelatedClass>::ConstIterator r = ancestorClass->baseClasses().constBegin(); while (r != ancestorClass->baseClasses().constEnd()) { - stack.prepend((*r).node); + if ((*r).node_) + stack.prepend((*r).node_); ++r; } } @@ -748,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", @@ -786,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); } @@ -1066,7 +1091,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, the list of documentation sections for the children of the \a qmlClassNode. */ -QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, SynopsisStyle style) +QList<Section> CppCodeMarker::qmlSections(QmlClassNode* qmlClassNode, SynopsisStyle style) { QList<Section> sections; if (qmlClassNode) { @@ -1107,7 +1132,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno "method", "methods"); - const QmlClassNode* qcn = qmlClassNode; + QmlClassNode* qcn = qmlClassNode; while (qcn != 0) { NodeList::ConstIterator c = qcn->childNodes().constBegin(); while (c != qcn->childNodes().constEnd()) { @@ -1146,7 +1171,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno ++c; } if (qcn->qmlBaseNode() != 0) { - qcn = static_cast<const QmlClassNode*>(qcn->qmlBaseNode()); + qcn = static_cast<QmlClassNode*>(qcn->qmlBaseNode()); if (!qcn->isAbstract()) qcn = 0; } @@ -1172,7 +1197,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno FastSection qmlmethods(qmlClassNode,"Method Documentation","qmlmeth","member","members"); FastSection qmlattachedmethods(qmlClassNode,"Attached Method Documentation","qmlattmeth", "member","members"); - const QmlClassNode* qcn = qmlClassNode; + QmlClassNode* qcn = qmlClassNode; while (qcn != 0) { NodeList::ConstIterator c = qcn->childNodes().constBegin(); while (c != qcn->childNodes().constEnd()) { @@ -1210,7 +1235,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno ++c; } if (qcn->qmlBaseNode() != 0) { - qcn = static_cast<const QmlClassNode*>(qcn->qmlBaseNode()); + qcn = static_cast<QmlClassNode*>(qcn->qmlBaseNode()); if (!qcn->isAbstract()) qcn = 0; } @@ -1232,7 +1257,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno */ ClassMap* classMap = 0; FastSection all(qmlClassNode,QString(),QString(),"member","members"); - const QmlClassNode* current = qmlClassNode; + QmlClassNode* current = qmlClassNode; while (current != 0) { /* If the QML type is abstract, do not create |