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/filedef.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/filedef.cpp')
-rw-r--r-- | src/filedef.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp index 1368628..543be1d 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -1408,7 +1408,7 @@ static Directory *findDirNode(Directory *root,const QCString &name) // add new branch to the root if (!root->children().isEmpty()) { - root->children().last()->setLast(FALSE); + root->children().getLast()->setLast(FALSE); } root->addChild(base); return newBranch; @@ -1428,7 +1428,7 @@ static Directory *findDirNode(Directory *root,const QCString &name) Directory *newBranch = new Directory(root,baseName); if (!root->children().isEmpty()) { - root->children().last()->setLast(FALSE); + root->children().getLast()->setLast(FALSE); } root->addChild(newBranch); return newBranch; @@ -1443,7 +1443,7 @@ static void mergeFileDef(Directory *root,FileDef *fd) Directory *dirNode = findDirNode(root,filePath); if (!dirNode->children().isEmpty()) { - dirNode->children().last()->setLast(FALSE); + dirNode->children().getLast()->setLast(FALSE); } DirEntry *e=new DirEntry(dirNode,fd); dirNode->addChild(e); @@ -1721,25 +1721,24 @@ void FileDef::addMemberToList(MemberListType lt,MemberDef *md) void FileDef::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 *FileDef::getMemberList(MemberListType lt) const { - FileDef *that = (FileDef*)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; } |