diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-09-14 19:12:26 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-09-14 19:12:26 +0900 |
commit | cd6978fd2a9397c456eac8d657e516e9c6f58bb0 (patch) | |
tree | 2dd35f57997eca372545dc5bc5f71d03b8bb9ec8 /src | |
parent | d27f4e2fc304208a404c64279a4e32b1a94b05a9 (diff) | |
download | qt3-cd6978fd2a9397c456eac8d657e516e9c6f58bb0.tar.gz qt3-cd6978fd2a9397c456eac8d657e516e9c6f58bb0.zip |
Added operator[] convenience function to QPtrList, similarly to QValueList.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/qptrlist.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/qptrlist.h b/src/tools/qptrlist.h index df465fa..de6d2af 100644 --- a/src/tools/qptrlist.h +++ b/src/tools/qptrlist.h @@ -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(); } |