diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2003-02-15 20:00:58 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2003-02-15 20:00:58 (GMT) |
commit | 067ee3cfc7a79acd42cedb3f89713b9ed5f47f93 (patch) | |
tree | d5ea8d453754a1b971fadd965b8949a3a3d0de9a /src/filedef.cpp | |
parent | e0e5c8556b4713e7dad60537658cd411f8dfd858 (diff) | |
download | Doxygen-067ee3cfc7a79acd42cedb3f89713b9ed5f47f93.zip Doxygen-067ee3cfc7a79acd42cedb3f89713b9ed5f47f93.tar.gz Doxygen-067ee3cfc7a79acd42cedb3f89713b9ed5f47f93.tar.bz2 |
Release-1.3-rc3-20020215
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r-- | src/filedef.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp index d360813..d3b606b 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -651,26 +651,32 @@ void FileDef::addIncludeDependency(FileDef *fd,const char *incName,bool local) void FileDef::addIncludedUsingDirectives() { - if (!visited) + if (visited) return; + visited=TRUE; + //printf("( FileDef::addIncludedUsingDirectives for file %s\n",name().data()); + + NamespaceList nl; + if (includeList) // file contains #includes { - visited=TRUE; - NamespaceList nl; - if (includeList) // file contains #includes { QListIterator<IncludeInfo> iii(*includeList); IncludeInfo *ii; - for (;(ii=iii.current());++iii) // foreach #include... + for (iii.toFirst();(ii=iii.current());++iii) // foreach #include... { - if (ii->fileDef) // ...that is a known file + if (ii->fileDef && !ii->fileDef->visited) // ...that is a known file { // recurse into this file ii->fileDef->addIncludedUsingDirectives(); } } + } + { + QListIterator<IncludeInfo> iii(*includeList); + IncludeInfo *ii; // iterate through list from last to first for (iii.toLast();(ii=iii.current());--iii) { - if (ii->fileDef) + if (ii->fileDef && ii->fileDef!=this) { NamespaceList *unl = ii->fileDef->usingDirList; if (unl) @@ -681,14 +687,16 @@ void FileDef::addIncludedUsingDirectives() { // append each using directive found in a #include file if (usingDirList==0) usingDirList = new NamespaceList; + //printf("Prepending used namespace %s to the list of file %s\n", + // nd->name().data(),name().data()); usingDirList->prepend(nd); } } } } } - // add elements of nl to usingDirList } + //printf(") end FileDef::addIncludedUsingDirectives for file %s\n",name().data()); } |