diff options
Diffstat (limited to 'src/groupdef.cpp')
-rw-r--r-- | src/groupdef.cpp | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 9426c24..0624892 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -659,8 +659,9 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title) ol.parseText(title); ol.endMemberHeader(); ol.startMemberList(); - FileDef *fd=fileList->first(); - while (fd) + QListIterator<FileDef> it(*fileList); + FileDef *fd; + for (;(fd=it.current());++it) { ol.startMemberDeclaration(); ol.startMemberItem(fd->getOutputFileBase(),0); @@ -679,7 +680,6 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title) ol.endMemberDescription(); } ol.endMemberDeclaration(0,0); - fd=fileList->next(); } ol.endMemberList(); } @@ -697,11 +697,11 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title) int count=0; if (groupList->count()>0) { - GroupDef *gd=groupList->first(); - while (gd) + QListIterator<GroupDef> it(*groupList); + GroupDef *gd; + for (;(gd=it.current());++it) { if (gd->isVisible()) count++; - gd=groupList->next(); } } if (count>0) @@ -714,8 +714,9 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title) { groupList->sort(); } - GroupDef *gd=groupList->first(); - while (gd) + QListIterator<GroupDef> it(*groupList); + GroupDef *gd; + for (;(gd=it.current());++it) { if (gd->isVisible()) { @@ -738,7 +739,6 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title) } ol.endMemberDeclaration(0,0); } - gd=groupList->next(); } ol.endMemberList(); } @@ -753,8 +753,9 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title) ol.parseText(title); ol.endMemberHeader(); ol.startMemberList(); - DirDef *dd=dirList->first(); - while (dd) + QListIterator<DirDef> it(*dirList); + DirDef *dd; + for (;(dd=it.current());++it) { ol.startMemberDeclaration(); ol.startMemberItem(dd->getOutputFileBase(),0); @@ -773,7 +774,6 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title) ol.endMemberDescription(); } ol.endMemberDeclaration(0,0); - dd=dirList->next(); } ol.endMemberList(); @@ -1436,26 +1436,24 @@ void GroupDef::addMemberToList(MemberListType lt,MemberDef *md) void GroupDef::sortMemberLists() { - MemberList *ml = m_memberLists.first(); - while (ml) + QListIterator<MemberList> mli(m_memberLists); + MemberList *ml; + for (;(ml=mli.current());++mli) { if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); } - ml = m_memberLists.next(); } } - MemberList *GroupDef::getMemberList(MemberListType lt) const { - GroupDef *that = (GroupDef*)this; - MemberList *ml = that->m_memberLists.first(); - while (ml) + QListIterator<MemberList> mli(m_memberLists); + MemberList *ml; + for (;(ml=mli.current());++mli) { if (ml->listType()==lt) { return ml; } - ml = that->m_memberLists.next(); } return 0; } |