From 4a627283263247deccc125d072f23d93057b8a65 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 24 Dec 2020 13:20:58 +0100 Subject: issue #8274 List entries for file & namespace enums (part 2) --- src/doxygen.cpp | 12 +++++++++--- src/xmlgen.cpp | 11 ++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 54e4915..0f06d8f 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -7252,8 +7252,6 @@ static void findEnumDocumentation(const Entry *root) && root->name.at(0)!='@' // skip anonymous enums ) { - //printf("Found docs for enum with name '%s' in context %s\n", - // root->name.data(),root->parent->name.data()); int i; QCString name; QCString scope; @@ -7277,6 +7275,11 @@ static void findEnumDocumentation(const Entry *root) const ClassDef *cd = getClass(scope); const NamespaceDef *nd=Doxygen::namespaceLinkedMap->find(scope); const FileDef *fd = root->fileDef(); + Debug::print(Debug::FindMembers,0,"1. Found docs for enum with name '%s' and scope '%s' in context %s cd=%s, nd=%s fd=%s\n", + name.data(),scope.data(),root->parent()->name.data(), + cd?cd->name().data():"", + nd?nd->name().data():"", + fd?fd->name().data():""); if (!name.isEmpty()) { @@ -7302,18 +7305,21 @@ static void findEnumDocumentation(const Entry *root) const FileDef *mfd = md->getFileDef(); if (mcd==cd) { + Debug::print(Debug::FindMembers,0,"2. Match found for class scope\n"); addEnumDocs(root,md); found=TRUE; break; } - else if (mnd==nd) + else if (cd==0 && mcd==0 && nd!=0 && mnd==nd) { + Debug::print(Debug::FindMembers,0,"2. Match found for namespace scope\n"); addEnumDocs(root,md); found=TRUE; break; } else if (cd==0 && nd==0 && mcd==0 && mnd==0 && fd==mfd) { + Debug::print(Debug::FindMembers,0,"2. Match found for global scope\n"); addEnumDocs(root,md); found=TRUE; break; diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 13f76cb..8ffaca2 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -482,6 +482,7 @@ static void writeMemberReference(FTextStream &t,const Definition *def,const Memb static void stripQualifiers(QCString &typeStr) { bool done=FALSE; + typeStr.stripPrefix("friend "); while (!done) { if (typeStr.stripPrefix("static ")); @@ -849,7 +850,15 @@ static void generateXMLForMember(const MemberDef *md,FTextStream &ti,FTextStream } } - if (isFunc) //function + if (md->isFriendClass()) // for friend classes we show a link to the class as a "parameter" + { + t << " " << endl; + t << " "; + linkifyText(TextGeneratorXMLImpl(t),def,md->getBodyDef(),md,md->name()); + t << "" << endl; + t << " " << endl; + } + else if (isFunc) //function { const ArgumentList &declAl = md->declArgumentList(); const ArgumentList &defAl = md->argumentList(); -- cgit v0.12