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/define.h | |
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/define.h')
-rw-r--r-- | src/define.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/define.h b/src/define.h index 843ecec..bc758c0 100644 --- a/src/define.h +++ b/src/define.h @@ -54,9 +54,10 @@ class DefineList : public QList<Define> public: DefineList() : QList<Define>() {} ~DefineList() {} - int compareItems(QCollection::Item i1,QCollection::Item i2) + private: + int compareValues(const Define *d1,const Define *d2) const { - return qstricmp(((Define *)i1)->name,((Define *)i2)->name); + return qstricmp(d1->name,d2->name); } }; @@ -67,12 +68,12 @@ class DefineName : public QList<Define> DefineName(const char *n) : QList<Define>() { name=n; } ~DefineName() {} const char *nameString() const { return name; } - int compareItems(QCollection::Item i1,QCollection::Item i2) + + private: + int compareValues(const Define *d1,const Define *d2) const { - return qstricmp(((Define *)i1)->name,((Define *)i2)->name); + return qstricmp(d1->name,d2->name); } - - private: QCString name; }; @@ -82,10 +83,10 @@ class DefineNameList : public QList<DefineName> public: DefineNameList() : QList<DefineName>() {} ~DefineNameList() {} - int compareItems(QCollection::Item i1,QCollection::Item i2) + private: + int compareValues(const DefineName *n1,const DefineName *n2) const { - return qstricmp(((DefineName *)i1)->nameString(), - ((DefineName *)i2)->nameString()); + return qstricmp(n1->nameString(),n2->nameString()); } }; |