summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-09-14 19:12:26 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-09-14 19:12:26 +0900
commitcd6978fd2a9397c456eac8d657e516e9c6f58bb0 (patch)
tree2dd35f57997eca372545dc5bc5f71d03b8bb9ec8
parentd27f4e2fc304208a404c64279a4e32b1a94b05a9 (diff)
downloadqt3-cd6978fd2a9397c456eac8d657e516e9c6f58bb0.tar.gz
qt3-cd6978fd2a9397c456eac8d657e516e9c6f58bb0.zip
Added operator[] convenience function to QPtrList, similarly to QValueList.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--doc/html/qptrlist-h.html1
-rw-r--r--src/tools/qptrlist.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/doc/html/qptrlist-h.html b/doc/html/qptrlist-h.html
index 158d7e8..5ebe21a 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 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(); }
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(); }