summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2020-09-02 12:15:07 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-09-03 10:12:18 +0000
commite530690ea5cc33992d92995bcf5f10de8634736e (patch)
treeb7d4d3025830fc3c26007860e052fcfac366df58 /src/corelib/tools
parent8f2d63febcc8c243ab86049755cf1b963d57f9f8 (diff)
Revert "Revert "QVector: add a construction from QArrayDataPointerRef""
Removing the constructor caused a binary compatibility break. The symbol is being used even though it might be considered private API. This reverts commit bf8268956b866e022825f81aa46833749a1ece28. Fixes: QTBUG-86392 Change-Id: I04fc3058e68a6a0cf293bcc8a5a83031dc1e96fb Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> (cherry picked from commit e4961b35deb202525d4711dbb14f8c2bb0bf5c26) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qvector.h1
-rw-r--r--src/corelib/tools/qvector.qdoc5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 083f12beb2..288c082c44 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); }
diff --git a/src/corelib/tools/qvector.qdoc b/src/corelib/tools/qvector.qdoc
index 0b82d47f49..116d962411 100644
--- a/src/corelib/tools/qvector.qdoc
+++ b/src/corelib/tools/qvector.qdoc
@@ -269,6 +269,11 @@
The value type of \c InputIterator must be convertible to \c T.
*/
+/*!
+ \fn template <typename T> QVector<T>::QVector(QArrayDataPointerRef<T> ref)
+ \internal
+*/
+
/*! \fn template <typename T> QVector<T>::~QVector()
Destroys the vector.