diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-08-14 13:56:38 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2011-08-14 13:56:38 (GMT) |
commit | 9e5aed6d58f0e33ca942f67daa49971d885b0110 (patch) | |
tree | 3138a0d18d53a00498b4cad59f934a4e64762cf8 /src/groupdef.cpp | |
parent | 3426c85df5daa8d679bc2ed87740ccbc34d6346b (diff) | |
download | Doxygen-9e5aed6d58f0e33ca942f67daa49971d885b0110.zip Doxygen-9e5aed6d58f0e33ca942f67daa49971d885b0110.tar.gz Doxygen-9e5aed6d58f0e33ca942f67daa49971d885b0110.tar.bz2 |
Release-1.7.5
Diffstat (limited to 'src/groupdef.cpp')
-rw-r--r-- | src/groupdef.cpp | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 8ecc784..12de564 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -145,11 +145,42 @@ bool GroupDef::addClass(const ClassDef *cd) if (cd->isHidden()) return FALSE; if (classSDict->find(cd->qualifiedName())==0) { - //printf("addClass %s sort=%d\n",cd->qualifiedName().data(),sortBriefDocs); + QCString qn = cd->qualifiedName(); + //printf("--- addClass %s sort=%d\n",qn.data(),sortBriefDocs); if (sortBriefDocs) + { classSDict->inSort(cd->qualifiedName(),cd); + } else - classSDict->append(cd->qualifiedName(),cd); + { + int i=qn.findRev("::"); + if (i==-1) i=qn.find('.'); + bool found=FALSE; + //printf("i=%d\n",i); + if (i!=-1) + { + // add nested classes (e.g. A::B, A::C) after their parent (A) in + // order of insertion + QCString scope = qn.left(i); + int j=classSDict->findAt(scope); + if (j!=-1) + { + while (j<(int)classSDict->count() && + classSDict->at(j)->qualifiedName().left(i)==scope) + { + //printf("skipping over %s\n",classSDict->at(j)->qualifiedName().data()); + j++; + } + //printf("Found scope at index %d\n",j); + classSDict->insertAt(j,cd->qualifiedName(),cd); + found=TRUE; + } + } + if (!found) // no insertion point found -> just append + { + classSDict->append(cd->qualifiedName(),cd); + } + } return TRUE; } return FALSE; |