Added operator[] convenience function to QPtrList, similarly to QValueList.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/2/head
Michele Calgaro 9 years ago
parent d27f4e2fc3
commit cd6978fd2a

@ -139,6 +139,7 @@ public:
uint containsRef( const type *d ) const
{ return QGList::containsRef((QPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); }
type *operator[]( uint i ) { return (type *)QGList::at(i); }
type *at( uint i ) { return (type *)QGList::at(i); }
int at() const { return QGList::at(); }
type *current() const { return (type *)QGList::get(); }

@ -103,6 +103,7 @@ public:
uint containsRef( const type *d ) const
{ return QGList::containsRef((QPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return QGList::replaceAt( i, (QPtrCollection::Item)d ); }
type *operator[]( uint i ) { return (type *)QGList::at(i); }
type *at( uint i ) { return (type *)QGList::at(i); }
int at() const { return QGList::at(); }
type *current() const { return (type *)QGList::get(); }

Loading…
Cancel
Save