summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-09-14 19:08:42 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-09-14 19:08:42 +0900
commit6b220f98eb885722d8de9dd4813a30b90b12ee2d (patch)
treeb3d321d6c71f4dde85d6afbde055329467a37ca4
parente418211d50821c0f65ca2e65c542e8c0afe2c066 (diff)
downloadtqt3-6b220f98.tar.gz
tqt3-6b220f98.zip
Added operator[] convenience function to TQPtrList, similarly to TQValueList.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--doc/html/qptrlist-h.html1
-rw-r--r--src/tools/ntqptrlist.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/doc/html/qptrlist-h.html b/doc/html/qptrlist-h.html
index 73e6f053..3ed91173 100644
--- a/doc/html/qptrlist-h.html
+++ b/doc/html/qptrlist-h.html
@@ -139,6 +139,7 @@ public:
uint containsRef( const type *d ) const
{ return TQGList::containsRef((TQPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return TQGList::replaceAt( i, (TQPtrCollection::Item)d ); }
+ type *operator[]( uint i ) { return (type *)TQGList::at(i); }
type *at( uint i ) { return (type *)TQGList::at(i); }
int at() const { return TQGList::at(); }
type *current() const { return (type *)TQGList::get(); }
diff --git a/src/tools/ntqptrlist.h b/src/tools/ntqptrlist.h
index 4482d0a9..7418e541 100644
--- a/src/tools/ntqptrlist.h
+++ b/src/tools/ntqptrlist.h
@@ -103,6 +103,7 @@ public:
uint containsRef( const type *d ) const
{ return TQGList::containsRef((TQPtrCollection::Item)d); }
bool replace( uint i, const type *d ) { return TQGList::replaceAt( i, (TQPtrCollection::Item)d ); }
+ type *operator[]( uint i ) { return (type *)TQGList::at(i); }
type *at( uint i ) { return (type *)TQGList::at(i); }
int at() const { return TQGList::at(); }
type *current() const { return (type *)TQGList::get(); }