diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-06-12 01:29:19 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2019-06-23 13:51:20 +0000 |
commit | 43c410867b5eccea2e0f7eeceabad76d5f874101 (patch) | |
tree | 23821d4db55454dada71cedae75e45130e234503 /src/corelib/tools/qvector.h | |
parent | 7000b70821493222ea2af10aae420b8cdd830953 (diff) |
QVector: add a construction from QArrayDataPointerRef
To be used to build QVectors out of Q_ARRAY_LITERALs.
Change-Id: I6105fd1f2d13f6ce923b79276b4aa7a7f5eff193
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r-- | src/corelib/tools/qvector.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 5d68a283bd..65a5174abf 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -80,6 +80,7 @@ public: QVector<T> &operator=(std::initializer_list<T> args); template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator> = true> inline QVector(InputIterator first, InputIterator last); + explicit QVector(QArrayDataPointerRef<T> ref) noexcept : d(ref.ptr) {} bool operator==(const QVector<T> &v) const; inline bool operator!=(const QVector<T> &v) const { return !(*this == v); } |