summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-05-25 17:27:33 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-05-25 17:27:33 (GMT)
commit1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3 (patch)
treed949caca7bdf5191997d16c3ed7bf6001e2000d5
parent97cb0de4dab1f9eb77325f7ee9f46dcaed8b0c69 (diff)
downloadDoxygen-1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3.zip
Doxygen-1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3.tar.gz
Doxygen-1ed8e5b7d77aa2d75d5799cec072a6b47a5722e3.tar.bz2
issue #8232: Incorrect link from summary links for namespaces
-rw-r--r--src/filedef.cpp2
-rw-r--r--src/groupdef.cpp2
-rw-r--r--src/namespacedef.cpp52
-rw-r--r--src/namespacedef.h2
4 files changed, 29 insertions, 29 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 7149b97..842808e 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -790,7 +790,7 @@ void FileDefImpl::writeSummaryLinks(OutputList &ol) const
ol.writeSummaryLink(QCString(),label,ls->title(lang),first);
first=FALSE;
}
- else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible())
+ else if (lde->kind()==LayoutDocEntry::FileNamespaces && m_namespaces.declVisible(false))
{
const LayoutDocEntrySection *ls = (const LayoutDocEntrySection*)lde.get();
QCString label = "namespaces";
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index a1ed4d5..7670d27 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -1059,7 +1059,7 @@ void GroupDefImpl::writeSummaryLinks(OutputList &ol) const
{
if ((lde->kind()==LayoutDocEntry::GroupClasses && m_classes.declVisible()) ||
(lde->kind()==LayoutDocEntry::GroupConcepts && m_concepts.declVisible()) ||
- (lde->kind()==LayoutDocEntry::GroupNamespaces && m_namespaces.declVisible()) ||
+ (lde->kind()==LayoutDocEntry::GroupNamespaces && m_namespaces.declVisible(false)) ||
(lde->kind()==LayoutDocEntry::GroupFiles && !m_fileList.empty()) ||
(lde->kind()==LayoutDocEntry::GroupNestedGroups && !m_groups.empty()) ||
(lde->kind()==LayoutDocEntry::GroupDirs && !m_dirList.empty())
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);
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 3c80470..46d2b1e 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -47,7 +47,7 @@ class NamespaceLinkedRefMap : public LinkedRefMap<const NamespaceDef>
public:
void writeDeclaration(OutputList &ol,const QCString &title,
bool isConstantGroup=false, bool localName=FALSE);
- bool declVisible() const;
+ bool declVisible(bool isContantGroup) const;
};
/** An abstract interface of a namespace symbol. */