diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-12-30 17:55:14 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-12-30 17:55:14 (GMT) |
commit | 6e51abf63021dc9fe32c05f003232fe68a08591d (patch) | |
tree | e9fe6f526e4a2b22b1a55659331c15750969a019 /src/groupdef.cpp | |
parent | 744d1ca52e25dfa9e3d656056d87ed7cb6320585 (diff) | |
download | Doxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.zip Doxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.tar.gz Doxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.tar.bz2 |
Reduced and improved functionality of QList
- operations on current index and node (next(), prev(), last(), first()) have been removed.
- access to internal nodes has been removed.
- old QList has been renamed to QInternalList for use inside qtools only.
- added type safe compare, new, and delete operations (compareValues(), newValue(), deleteValue()).
- add compareValues also to QDict for consistency.
- changed doxygen's implementation to comply with the new QList and QDict interface.
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; } |