summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-01-25 21:11:43 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-01-25 21:11:43 (GMT)
commit3ced61065d252f4f8a3cf5f310f30094d91ac83c (patch)
tree5e3ff29c80e73d69c88e8b33d670753c31eed4b2 /src/util.cpp
parent29348f280d674693e74e30ae55ca63ab3b97372e (diff)
downloadDoxygen-3ced61065d252f4f8a3cf5f310f30094d91ac83c.zip
Doxygen-3ced61065d252f4f8a3cf5f310f30094d91ac83c.tar.gz
Doxygen-3ced61065d252f4f8a3cf5f310f30094d91ac83c.tar.bz2
Release-1.3.5-20040125
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp53
1 files changed, 49 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 94180f2..ff0ec8d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -847,15 +847,53 @@ int isAccessibleFrom(Definition *scope,FileDef *fileScope,Definition *item,
Definition *newScope = followPath(scope,fileScope,explicitScopePart);
if (newScope) // explicitScope is inside scope => newScope is the result
{
- //printf("scope traversal successful!\n");
+ //printf("scope traversal successful %s<->%s!\n",item->getOuterScope()->name().data(),newScope->name().data());
if (item->getOuterScope()==newScope)
{
//printf("> found it\n");
}
else
{
- // repeat for the parent scope
int i=-1;
+ if (newScope->definitionType()==Definition::TypeNamespace)
+ {
+ // this part deals with the case where item is a class
+ // A::B::C but is explicit referenced as A::C, where B is imported
+ // in A via a using directive.
+ //printf("newScope is a namespace: %s!\n",newScope->name().data());
+ NamespaceDef *nscope = (NamespaceDef*)newScope;
+ ClassSDict *cl = nscope->getUsedClasses();
+ if (cl)
+ {
+ ClassSDict::Iterator cli(*cl);
+ ClassDef *cd;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ i = isAccessibleFrom(scope,fileScope,item,cd->name());
+ if (i!=-1)
+ {
+ //printf("> found via explicit scope of used class\n");
+ goto done;
+ }
+ }
+ }
+ NamespaceSDict *nl = nscope->getUsedNamespaces();
+ if (nl)
+ {
+ NamespaceSDict::Iterator nli(*nl);
+ NamespaceDef *nd;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ i = isAccessibleFrom(scope,fileScope,item,nd->name());
+ if (i!=-1)
+ {
+ //printf("> found via explicit scope of used namespace\n");
+ goto done;
+ }
+ }
+ }
+ }
+ // repeat for the parent scope
if (scope!=Doxygen::globalScope)
{
i = isAccessibleFrom(scope->getOuterScope(),fileScope,item,explicitScopePart);
@@ -1381,17 +1419,24 @@ QCString argListToString(ArgumentList *al)
result+="(";
while (a)
{
+ QCString type1 = a->type, type2;
+ int i=type1.find(")("); // hack to deal with function pointers
+ if (i!=-1)
+ {
+ type2=type1.mid(i);
+ type1=type1.left(i);
+ }
if (!a->attrib.isEmpty())
{
result+=a->attrib+" ";
}
if (!a->name.isEmpty() || !a->array.isEmpty())
{
- result+= a->type+" "+a->name+a->array;
+ result+= type1+" "+a->name+type2+a->array;
}
else
{
- result+= a->type;
+ result+= type1+type2;
}
if (!a->defval.isEmpty())
{