summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-11-06 09:19:29 +0100
committerhjk <hjk121@nokiamail.com>2014-11-06 11:33:52 +0100
commitd3f3e1218c07cad7f69eebe9b011bededb45bfa5 (patch)
tree155d0289dfde0d3cc3ca961f329503a66935edae /src/corelib/tools/qvector.h
parent1031ad876142461c0256fc78648747171c1b48db (diff)
Add a inline QVector::append(const QVector &) overload
This is present in QList already and its lack is a nuisance when switching from QList based code to QVector (which makes sense e.g. if the item size exceeds sizeof(void*)) Also, albeit operator+=() and operator<<() exist, some people simply prefer functions with real function names. [ChangeLog][QtCore][QVector] Added QVector::append(const QVector &) overload Change-Id: I9aae8223b086765625f2f3071fab5da0780f8a43 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r--src/corelib/tools/qvector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 9c8d9d4cf8..c00bd07a72 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -128,6 +128,7 @@ public:
T &operator[](int i);
const T &operator[](int i) const;
void append(const T &t);
+ inline void append(const QVector<T> &l) { *this += l; }
void prepend(const T &t);
void insert(int i, const T &t);
void insert(int i, int n, const T &t);