summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2004-11-29 19:11:02 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2004-11-29 19:11:02 (GMT)
commit02aa9b678dbeb1867c68278045b28d7bc1683f7c (patch)
treeae4f833eab5f7b63e139145daee905c412ebd229 /src/util.cpp
parent05930245579c006f2b5bfca53e0a1976d682f9b8 (diff)
downloadDoxygen-02aa9b678dbeb1867c68278045b28d7bc1683f7c.zip
Doxygen-02aa9b678dbeb1867c68278045b28d7bc1683f7c.tar.gz
Doxygen-02aa9b678dbeb1867c68278045b28d7bc1683f7c.tar.bz2
Release-1.3.9.1-20041129
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 1f625c6..52d2889 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -2602,6 +2602,7 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
{
QCString type = arg->type;
QCString name = arg->name;
+ printf("extractCanonicalType(type=%s,name=%s)\n",type.data(),name.data());
if ((type=="const" || type=="volatile") && !name.isEmpty())
{ // name is part of type => correct
type+=" ";
@@ -2623,27 +2624,37 @@ static QCString extractCanonicalType(Definition *d,FileDef *fs,const Argument *a
else if (type.left(5)=="enum ") type=type.right(type.length()-5);
else if (type.left(9)=="typename ") type=type.right(type.length()-9);
- static QRegExp id("[a-z_A-Z][a-z_A-Z0-9]*");
+ static QRegExp id("[a-z_A-Z][:a-z_A-Z0-9]*");
QCString canType;
int i,p=0,l;
- while ((i=id.match(type,p,&l))) // foreach identifier in the type
+ while ((i=id.match(type,p,&l))!=-1) // foreach identifier in the type
{
canType += type.mid(p,i-p);
QCString word = type.mid(i,l);
ClassDef *cd = getResolvedClass(d,fs,word);
+ printf("word %s => %s\n",word.data(),cd?cd->qualifiedName().data():"<none>");
if (cd)
{
canType+=cd->qualifiedName();
}
else
{
- canType+=word;
+ QCString resolvedType = resolveTypeDef(d,word);
+ if (resolvedType.isEmpty())
+ {
+ canType+=word;
+ }
+ else
+ {
+ canType+=resolvedType;
+ }
}
p=i+l;
}
canType += type.right(type.length()-p);
+ printf("result = %s\n",canType.data());
return removeRedundantWhiteSpace(canType);
}