Skip to content

Commit 33b0f4d

Browse files
committed
issue #8103: C++ Table of content, namespace list does not contains namespace without class (part 2)
1 parent ade26d5 commit 33b0f4d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,17 +1619,15 @@ static void writeClassTree(ClassSDict *clDict,FTVHelp *ftv,bool addToIndex,bool
16191619
{
16201620
ftv->addContentsItem(count>0,cd->displayName(FALSE),cd->getReference(),
16211621
cd->getOutputFileBase(),cd->anchor(),FALSE,TRUE,cd);
1622-
if (addToIndex &&
1623-
/*cd->partOfGroups()==0 &&*/
1624-
(cd->getOuterScope()==0 ||
1622+
if ((cd->getOuterScope()==0 ||
16251623
cd->getOuterScope()->definitionType()!=Definition::TypeClass
16261624
)
16271625
)
16281626
{
16291627
addMembersToIndex(cd,LayoutDocManager::Class,
16301628
cd->displayName(FALSE),
16311629
cd->anchor(),
1632-
cd->partOfGroups()==0 && !cd->isSimple());
1630+
addToIndex && cd->partOfGroups()==0 && !cd->isSimple());
16331631
}
16341632
if (count>0)
16351633
{
@@ -1711,7 +1709,8 @@ static void writeNamespaceTree(const NamespaceSDict *nsDict,FTVHelp *ftv,
17111709
(!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
17121710
{
17131711

1714-
bool hasChildren = namespaceHasNestedNamespace(nd);
1712+
bool hasChildren = namespaceHasNestedNamespace(nd) ||
1713+
namespaceHasNestedClass(nd,false,ClassDef::Class);
17151714
bool isLinkable = nd->isLinkableInProject();
17161715
int visibleMembers = countVisibleMembers(nd);
17171716

@@ -1750,6 +1749,7 @@ static void writeNamespaceTree(const NamespaceSDict *nsDict,FTVHelp *ftv,
17501749
{
17511750
ftv->incContentsDepth();
17521751
writeNamespaceTree(nd->getNamespaceSDict(),ftv,FALSE,addToIndex);
1752+
writeClassTree(nd->getClassSDict(),ftv,FALSE,FALSE,ClassDef::Class);
17531753
writeNamespaceMembers(nd,addToIndex);
17541754
ftv->decContentsDepth();
17551755
}

0 commit comments

Comments
 (0)