From 43c410867b5eccea2e0f7eeceabad76d5f874101 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 12 Jun 2019 01:29:19 +0200 Subject: QVector: add a construction from QArrayDataPointerRef To be used to build QVectors out of Q_ARRAY_LITERALs. Change-Id: I6105fd1f2d13f6ce923b79276b4aa7a7f5eff193 Reviewed-by: Thiago Macieira Reviewed-by: Marc Mutz --- src/corelib/tools/qvector.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/tools/qvector.h') 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 &operator=(std::initializer_list args); template = true> inline QVector(InputIterator first, InputIterator last); + explicit QVector(QArrayDataPointerRef ref) noexcept : d(ref.ptr) {} bool operator==(const QVector &v) const; inline bool operator!=(const QVector &v) const { return !(*this == v); } -- cgit v1.2.3