summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-11-29 19:11:02 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-11-29 19:11:02 (GMT)
commit4a50fc78170244f82c376bbecd28be43cc849da3 (patch)
treeae4f833eab5f7b63e139145daee905c412ebd229 /src/util.cpp
parent0625007cb86815b2e30138183d4fe9d2e7850df9 (diff)
downloadDoxygen-4a50fc78170244f82c376bbecd28be43cc849da3.zip
Doxygen-4a50fc78170244f82c376bbecd28be43cc849da3.tar.gz
Doxygen-4a50fc78170244f82c376bbecd28be43cc849da3.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);
}