summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-12-27 14:29:30 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-12-27 14:41:52 (GMT)
commit926986081bf9b97d4a25b11846af55e51d9f9871 (patch)
tree3e261315704427e9fbc4bdd152b174e31f2aa77e /src
parentdf635742c8fefb76f0313062d03707649cb93097 (diff)
downloadDoxygen-926986081bf9b97d4a25b11846af55e51d9f9871.zip
Doxygen-926986081bf9b97d4a25b11846af55e51d9f9871.tar.gz
Doxygen-926986081bf9b97d4a25b11846af55e51d9f9871.tar.bz2
issue #7319: Bug 790856 - Namespace member functions links are broken
Diffstat (limited to 'src')
-rw-r--r--src/dotcallgraph.cpp16
-rw-r--r--src/memberdef.cpp8
2 files changed, 14 insertions, 10 deletions
diff --git a/src/dotcallgraph.cpp b/src/dotcallgraph.cpp
index b024f09..5e13f8e 100644
--- a/src/dotcallgraph.cpp
+++ b/src/dotcallgraph.cpp
@@ -24,6 +24,14 @@
#define DOT_GRAPH_MAX_NODES Config_getInt(DOT_GRAPH_MAX_NODES)
#define MAX_DOT_GRAPH_DEPTH Config_getInt(MAX_DOT_GRAPH_DEPTH)
+static QCString getUniqueId(const MemberDef *md)
+{
+ QCString result = md->getReference()+"$"+
+ md->getOutputFileBase()+"#"+
+ md->anchor();
+ return result;
+}
+
void DotCallGraph::buildGraph(DotNode *n,const MemberDef *md,int distance)
{
MemberSDict *refs = m_inverse ? md->getReferencedByMembers() : md->getReferencesMembers();
@@ -36,9 +44,7 @@ void DotCallGraph::buildGraph(DotNode *n,const MemberDef *md,int distance)
{
if (rmd->showInCallGraph())
{
- QCString uniqueId;
- uniqueId=rmd->getReference()+"$"+
- rmd->getOutputFileBase()+"#"+rmd->anchor();
+ QCString uniqueId = getUniqueId(rmd);
DotNode *bn = m_usedNodes->find(uniqueId);
if (bn) // file is already a node in the graph
{
@@ -131,9 +137,7 @@ DotCallGraph::DotCallGraph(const MemberDef *md,bool inverse)
m_inverse = inverse;
m_diskName = md->getOutputFileBase()+"_"+md->anchor();
m_scope = md->getOuterScope();
- QCString uniqueId;
- uniqueId = md->getReference()+"$"+
- md->getOutputFileBase()+"#"+md->anchor();
+ QCString uniqueId = getUniqueId(md);
QCString name;
if (HIDE_SCOPE_NAMES)
{
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index e03d1df..3349501 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -1763,7 +1763,7 @@ QCString MemberDefImpl::getOutputFileBase() const
{
baseName=groupDef->getOutputFileBase();
}
- else if (classDef)
+ else if (classDef && classDef->isLinkable())
{
baseName=classDef->getOutputFileBase();
if (inlineSimpleClasses && classDef->isSimple())
@@ -1771,7 +1771,7 @@ QCString MemberDefImpl::getOutputFileBase() const
return baseName;
}
}
- else if (nspace)
+ else if (nspace && (nspace->isLinkable() || nspace->isAnonymous()))
{
baseName=nspace->getOutputFileBase();
}
@@ -3362,9 +3362,9 @@ void MemberDefImpl::writeDocumentation(const MemberList *ml,
else if (getFileDef()) { scopeName=getFileDef()->displayName(); scopedContainer=getFileDef(); }
ciname = (dynamic_cast<const GroupDef *>(container))->groupTitle();
}
- else if (container->definitionType()==TypeFile && getNamespaceDef() && lang != SrcLangExt_Python)
+ else if (container->definitionType()==TypeFile && getNamespaceDef() && getNamespaceDef()->isLinkable())
{ // member is in a namespace, but is written as part of the file documentation
- // as well, so we need to make sure its label is unique.
+ // as well, so we need to make sure its anchor is unique (it is not really used).
memAnchor.prepend("file_");
}