summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dotcallgraph.cpp16
-rw-r--r--src/memberdef.cpp8
-rw-r--r--testing/078/078__xml__namespace__members__in__file__scope_8h.xml4
3 files changed, 16 insertions, 12 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_");
}
diff --git a/testing/078/078__xml__namespace__members__in__file__scope_8h.xml b/testing/078/078__xml__namespace__members__in__file__scope_8h.xml
index 078c5ad..1198549 100644
--- a/testing/078/078__xml__namespace__members__in__file__scope_8h.xml
+++ b/testing/078/078__xml__namespace__members__in__file__scope_8h.xml
@@ -4,7 +4,7 @@
<compoundname>078_xml_namespace_members_in_file_scope.h</compoundname>
<innernamespace refid="namespace_namespace">Namespace</innernamespace>
<sectiondef kind="enum">
- <memberdef kind="enum" id="namespace_namespace_1add172b93283b1ab7612c3ca6cc5dcfea" prot="public" static="no" strong="yes">
+ <memberdef kind="enum" id="078__xml__namespace__members__in__file__scope_8h_1add172b93283b1ab7612c3ca6cc5dcfea" prot="public" static="no" strong="yes">
<type/>
<name>Enum</name>
<briefdescription>
@@ -18,7 +18,7 @@
</memberdef>
</sectiondef>
<sectiondef kind="func">
- <memberdef kind="function" id="namespace_namespace_1a0f1fe1a972c7c4196988a1bdde63ec77" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <memberdef kind="function" id="078__xml__namespace__members__in__file__scope_8h_1a0f1fe1a972c7c4196988a1bdde63ec77" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
<definition>void Namespace::foo</definition>
<argsstring>()</argsstring>