diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-05-25 17:27:33 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-05-25 17:27:33 (GMT) |
commit | 1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3 (patch) | |
tree | d949caca7bdf5191997d16c3ed7bf6001e2000d5 /src/namespacedef.cpp | |
parent | 97cb0de4dab1f9eb77325f7ee9f46dcaed8b0c69 (diff) | |
download | Doxygen-1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3.zip Doxygen-1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3.tar.gz Doxygen-1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3.tar.bz2 |
issue #8232: Incorrect link from summary links for namespaces
Diffstat (limited to 'src/namespacedef.cpp')
-rw-r--r-- | src/namespacedef.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 58d0ff0..f3ec7ae 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -839,13 +839,20 @@ void NamespaceDefImpl::writeSummaryLinks(OutputList &ol) const ol.writeSummaryLink(QCString(),label,ls->title(lang),first); first=FALSE; } - else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible()) + else if (lde->kind()==LayoutDocEntry::NamespaceNestedNamespaces && namespaces.declVisible(false)) { const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get(); QCString label = "namespaces"; ol.writeSummaryLink(QCString(),label,ls->title(lang),first); first=FALSE; } + else if (lde->kind()==LayoutDocEntry::NamespaceNestedConstantGroups && namespaces.declVisible(true)) + { + const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get(); + QCString label = "constantgroups"; + ol.writeSummaryLink(QCString(),label,ls->title(lang),first); + first=FALSE; + } else if (lde->kind()==LayoutDocEntry::NamespaceConcepts && m_concepts.declVisible()) { const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get(); @@ -1270,28 +1277,9 @@ void NamespaceDefImpl::combineUsingRelations(NamespaceDefSet &visitedNamespaces) //------------------------------------------------------------------------------- -bool NamespaceLinkedRefMap::declVisible() const -{ - for (const auto &nd : *this) - { - if (nd->isLinkable()) - { - return TRUE; - } - } - return FALSE; -} - -void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &title, - bool const isConstantGroup,bool localName) +bool NamespaceLinkedRefMap::declVisible(bool isConstantGroup) const { - - - if (empty()) return; // no namespaces in the list - - if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return; - - bool found=FALSE; + bool found=false; for (const auto &nd : *this) { if (nd->isLinkable() && nd->hasDocumentation()) @@ -1301,7 +1289,7 @@ void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &titl { if (isConstantGroup == nd->isConstantGroup()) { - found=TRUE; + found=true; break; } } @@ -1311,15 +1299,27 @@ void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &titl { err("Internal inconsistency: constant group but not IDL?\n"); } - found=TRUE; + found=true; break; } } } - if (!found) return; // no linkable namespaces in the list + return found; +} + +void NamespaceLinkedRefMap::writeDeclaration(OutputList &ol,const QCString &title, + bool const isConstantGroup,bool localName) +{ + + + if (empty()) return; // no namespaces in the list + + if (Config_getBool(OPTIMIZE_OUTPUT_VHDL)) return; + + if (!declVisible(isConstantGroup)) return; // write list of namespaces - ol.startMemberHeader("namespaces"); + ol.startMemberHeader(isConstantGroup ? "constantgroups" : "namespaces"); //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA); //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); ol.parseText(title); |