summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/cppcodemarker.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-12-04 14:12:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-05 17:29:46 +0100
commitfd1f65a9b84d597078482cd420771620c406f8da (patch)
treeb6d35944932d4723094cb6bd989066cb127499ff /src/tools/qdoc/cppcodemarker.cpp
parent4b819803f63ea58ac4cc4e8bc61f12321f91197a (diff)
qdoc: Don't include inherited members in the class ref
Once upon a time, the inherited functions, signals, slots, etc were not listed on the class reference page, but they were counted and a link to the base class was provided for them, eg: 2 public functions inherited from QAbstractListModel 39 public functions inherited from QAbstractItemModel 31 public functions inherited from QObject Somehow, this got broken, so that all these inherited things were listed on the class reference page as if they were members of the class. But they liunked to the documentation in the base class. This now works correctly again. It simnplifies the class reference pages a lot. Task-number: QTBUG-27496 Change-Id: If493da8cbf81634f1344b12094d9a06f8528e8e5 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodemarker.cpp')
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 3abe4c2a650..ccff1c18caa 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -449,74 +449,74 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
QList<Section> sections;
if (inner->type() == Node::Class) {
- const ClassNode *classe = static_cast<const ClassNode *>(inner);
+ const ClassNode *classNode = static_cast<const ClassNode *>(inner);
if (style == Summary) {
- FastSection privateFunctions(classe,
+ FastSection privateFunctions(classNode,
"Private Functions",
QString(),
"private function",
"private functions");
- FastSection privateSlots(classe, "Private Slots", QString(), "private slot", "private slots");
- FastSection privateTypes(classe, "Private Types", QString(), "private type", "private types");
- FastSection protectedFunctions(classe,
+ FastSection privateSlots(classNode, "Private Slots", QString(), "private slot", "private slots");
+ FastSection privateTypes(classNode, "Private Types", QString(), "private type", "private types");
+ FastSection protectedFunctions(classNode,
"Protected Functions",
QString(),
"protected function",
"protected functions");
- FastSection protectedSlots(classe,
+ FastSection protectedSlots(classNode,
"Protected Slots",
QString(),
"protected slot",
"protected slots");
- FastSection protectedTypes(classe,
+ FastSection protectedTypes(classNode,
"Protected Types",
QString(),
"protected type",
"protected types");
- FastSection protectedVariables(classe,
+ FastSection protectedVariables(classNode,
"Protected Variables",
QString(),
"protected type",
"protected variables");
- FastSection publicFunctions(classe,
+ FastSection publicFunctions(classNode,
"Public Functions",
QString(),
"public function",
"public functions");
- FastSection publicSignals(classe, "Signals", QString(), "signal", "signal");
- FastSection publicSlots(classe, "Public Slots", QString(), "public slot", "public slots");
- FastSection publicTypes(classe, "Public Types", QString(), "public type", "public types");
- FastSection publicVariables(classe,
+ FastSection publicSignals(classNode, "Signals", QString(), "signal", "signal");
+ FastSection publicSlots(classNode, "Public Slots", QString(), "public slot", "public slots");
+ FastSection publicTypes(classNode, "Public Types", QString(), "public type", "public types");
+ FastSection publicVariables(classNode,
"Public Variables",
QString(),
"public variable",
"public variables");
- FastSection properties(classe, "Properties", QString(), "property", "properties");
- FastSection relatedNonMembers(classe,
+ FastSection properties(classNode, "Properties", QString(), "property", "properties");
+ FastSection relatedNonMembers(classNode,
"Related Non-Members",
QString(),
"related non-member",
"related non-members");
- FastSection staticPrivateMembers(classe,
+ FastSection staticPrivateMembers(classNode,
"Static Private Members",
QString(),
"static private member",
"static private members");
- FastSection staticProtectedMembers(classe,
+ FastSection staticProtectedMembers(classNode,
"Static Protected Members",
QString(),
"static protected member",
"static protected members");
- FastSection staticPublicMembers(classe,
+ FastSection staticPublicMembers(classNode,
"Static Public Members",
QString(),
"static public member",
"static public members");
FastSection macros(inner, "Macros", QString(), "macro", "macros");
- NodeList::ConstIterator r = classe->relatedNodes().constBegin();
- while (r != classe->relatedNodes().constEnd()) {
+ NodeList::ConstIterator r = classNode->relatedNodes().constBegin();
+ while (r != classNode->relatedNodes().constEnd()) {
if ((*r)->type() == Node::Function) {
FunctionNode *func = static_cast<FunctionNode *>(*r);
if (func->isMacro())
@@ -531,7 +531,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
}
QStack<const ClassNode *> stack;
- stack.push(classe);
+ stack.push(classNode);
while (!stack.isEmpty()) {
const ClassNode *ancestorClass = stack.pop();
@@ -566,8 +566,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(publicSignals, *c, style, status);
}
else if (isStatic) {
- if ((*c)->type() != Node::Variable
- || !(*c)->doc().isEmpty())
+ if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty())
insert(staticPublicMembers,*c,style,status);
}
else if ((*c)->type() == Node::Property) {
@@ -578,8 +577,9 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(publicVariables, *c, style, status);
}
else if ((*c)->type() == Node::Function) {
- if (!insertReimpFunc(publicFunctions,*c,status))
+ if (!insertReimpFunc(publicFunctions,*c,status)) {
insert(publicFunctions, *c, style, status);
+ }
}
else {
insert(publicTypes, *c, style, status);
@@ -590,8 +590,7 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(protectedSlots, *c, style, status);
}
else if (isStatic) {
- if ((*c)->type() != Node::Variable
- || !(*c)->doc().isEmpty())
+ if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty())
insert(staticProtectedMembers,*c,style,status);
}
else if ((*c)->type() == Node::Variable) {
@@ -599,8 +598,9 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(protectedVariables,*c,style,status);
}
else if ((*c)->type() == Node::Function) {
- if (!insertReimpFunc(protectedFunctions,*c,status))
+ if (!insertReimpFunc(protectedFunctions,*c,status)) {
insert(protectedFunctions, *c, style, status);
+ }
}
else {
insert(protectedTypes, *c, style, status);
@@ -611,13 +611,13 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
insert(privateSlots, *c, style, status);
}
else if (isStatic) {
- if ((*c)->type() != Node::Variable
- || !(*c)->doc().isEmpty())
+ if ((*c)->type() != Node::Variable || !(*c)->doc().isEmpty())
insert(staticPrivateMembers,*c,style,status);
}
else if ((*c)->type() == Node::Function) {
- if (!insertReimpFunc(privateFunctions,*c,status))
+ if (!insertReimpFunc(privateFunctions,*c,status)) {
insert(privateFunctions, *c, style, status);
+ }
}
else {
insert(privateTypes,*c,style,status);
@@ -654,15 +654,15 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
append(sections, macros);
}
else if (style == Detailed) {
- FastSection memberFunctions(classe,"Member Function Documentation","func","member","members");
- FastSection memberTypes(classe,"Member Type Documentation","types","member","members");
- FastSection memberVariables(classe,"Member Variable Documentation","vars","member","members");
- FastSection properties(classe,"Property Documentation","prop","member","members");
- FastSection relatedNonMembers(classe,"Related Non-Members","relnonmem","member","members");
- FastSection macros(classe,"Macro Documentation","macros","member","members");
-
- NodeList::ConstIterator r = classe->relatedNodes().constBegin();
- while (r != classe->relatedNodes().constEnd()) {
+ FastSection memberFunctions(classNode,"Member Function Documentation","func","member","members");
+ FastSection memberTypes(classNode,"Member Type Documentation","types","member","members");
+ FastSection memberVariables(classNode,"Member Variable Documentation","vars","member","members");
+ FastSection properties(classNode,"Property Documentation","prop","member","members");
+ FastSection relatedNonMembers(classNode,"Related Non-Members","relnonmem","member","members");
+ FastSection macros(classNode,"Macro Documentation","macros","member","members");
+
+ NodeList::ConstIterator r = classNode->relatedNodes().constBegin();
+ while (r != classNode->relatedNodes().constEnd()) {
if ((*r)->type() == Node::Function) {
FunctionNode *func = static_cast<FunctionNode *>(*r);
if (func->isMacro())
@@ -676,8 +676,8 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
++r;
}
- NodeList::ConstIterator c = classe->childNodes().constBegin();
- while (c != classe->childNodes().constEnd()) {
+ NodeList::ConstIterator c = classNode->childNodes().constBegin();
+ while (c != classNode->childNodes().constEnd()) {
if ((*c)->type() == Node::Enum ||
(*c)->type() == Node::Typedef) {
insert(memberTypes, *c, style, status);
@@ -705,10 +705,10 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
append(sections, macros);
}
else {
- FastSection all(classe,QString(),QString(),"member","members");
+ FastSection all(classNode,QString(),QString(),"member","members");
QStack<const ClassNode *> stack;
- stack.push(classe);
+ stack.push(classNode);
while (!stack.isEmpty()) {
const ClassNode *ancestorClass = stack.pop();