summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGordon Schumacher <gordons@valleyhold.org>2010-06-08 11:37:30 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-06-08 11:45:10 (GMT)
commita0dc2b8344e2a24d78d5648bfb0f9f76bca37ca9 (patch)
treefc97822935cdb95ee9aad92e8b8f3c41e4d4b19e
parentd0e209747a31c3e06f82e831fc3695986e12e9cd (diff)
downloadQt-a0dc2b8344e2a24d78d5648bfb0f9f76bca37ca9.zip
Qt-a0dc2b8344e2a24d78d5648bfb0f9f76bca37ca9.tar.gz
Qt-a0dc2b8344e2a24d78d5648bfb0f9f76bca37ca9.tar.bz2
QVarLenghtArray: Add typedefs for stl compatibility.
Merge-request: 599 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
-rw-r--r--src/corelib/tools/qvarlengtharray.h7
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc49
2 files changed, 56 insertions, 0 deletions
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index bfede94..4a6bb4b 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -127,6 +127,13 @@ public:
inline T *data() { return ptr; }
inline const T *data() const { return ptr; }
inline const T * constData() const { return ptr; }
+ typedef int size_type;
+ typedef T value_type;
+ typedef value_type *pointer;
+ typedef const value_type *const_pointer;
+ typedef value_type &reference;
+ typedef const value_type &const_reference;
+ typedef qptrdiff difference_type;
private:
friend class QPodList<T, Prealloc>;
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 38901e5..ef2dc58 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -302,3 +302,52 @@
\a defaultValue.
*/
+/*!
+ \typedef QVarLengthArray::size_type
+ \since 4.7
+
+ Typedef for int. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QVarLengthArray::value_type
+ \since 4.7
+
+ Typedef for T. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QVarLengthArray::difference_type
+ \since 4.7
+
+ Typedef for ptrdiff_t. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QVarLengthArray::pointer
+ \since 4.7
+
+ Typedef for T *. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QVarLengthArray::const_pointer
+ \since 4.7
+
+ Typedef for const T *. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QVarLengthArray::reference
+ \since 4.7
+
+ Typedef for T &. Provided for STL compatibility.
+*/
+
+/*!
+ \typedef QVarLengthArray::const_reference
+ \since 4.7
+
+ Typedef for const T &. Provided for STL compatibility.
+*/
+