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/dirdef.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/dirdef.cpp')
-rw-r--r-- | src/dirdef.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 5df047a..b7a2a92 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -224,8 +224,9 @@ void DirDef::writeSubDirList(OutputList &ol) ol.parseText(theTranslator->trDir(TRUE,FALSE)); ol.endMemberHeader(); ol.startMemberList(); - DirDef *dd=m_subdirs.first(); - while (dd) + QListIterator<DirDef> it(m_subdirs); + DirDef *dd; + for (;(dd=it.current());++it) { ol.startMemberDeclaration(); ol.startMemberItem(dd->getOutputFileBase(),0); @@ -250,7 +251,6 @@ void DirDef::writeSubDirList(OutputList &ol) ol.endMemberDescription(); } ol.endMemberDeclaration(0,0); - dd=m_subdirs.next(); } ol.endMemberList(); @@ -266,8 +266,9 @@ void DirDef::writeFileList(OutputList &ol) ol.parseText(theTranslator->trFile(TRUE,FALSE)); ol.endMemberHeader(); ol.startMemberList(); - FileDef *fd=m_fileList->first(); - while (fd) + QListIterator<FileDef> it(*m_fileList); + FileDef *fd; + for (;(fd=it.current());++it) { ol.startMemberDeclaration(); ol.startMemberItem(fd->getOutputFileBase(),0); @@ -313,7 +314,6 @@ void DirDef::writeFileList(OutputList &ol) ol.endMemberDescription(); } ol.endMemberDeclaration(0,0); - fd=m_fileList->next(); } ol.endMemberList(); } @@ -584,10 +584,8 @@ bool DirDef::depGraphIsTrivial() const //---------------------------------------------------------------------- -int FilePairDict::compareItems(QCollection::Item item1,QCollection::Item item2) +int FilePairDict::compareValues(const FilePair *left,const FilePair *right) const { - FilePair *left = (FilePair*)item1; - FilePair *right = (FilePair*)item2; int orderHi = qstricmp(left->source()->name(),right->source()->name()); int orderLo = qstricmp(left->destination()->name(),right->destination()->name()); return orderHi==0 ? orderLo : orderHi; |