Skip to content

Commit e4961b3

Browse files
committed
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 bf82689. Fixes: QTBUG-86392 Pick-to: 5.15 Change-Id: I04fc3058e68a6a0cf293bcc8a5a83031dc1e96fb Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
1 parent 85aa563 commit e4961b3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/corelib/tools/qvector.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class QVector
8080
QVector<T> &operator=(std::initializer_list<T> args);
8181
template <typename InputIterator, QtPrivate::IfIsInputIterator<InputIterator> = true>
8282
inline QVector(InputIterator first, InputIterator last);
83+
explicit QVector(QArrayDataPointerRef<T> ref) noexcept : d(ref.ptr) {}
8384

8485
bool operator==(const QVector<T> &v) const;
8586
inline bool operator!=(const QVector<T> &v) const { return !(*this == v); }

src/corelib/tools/qvector.qdoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@
269269
The value type of \c InputIterator must be convertible to \c T.
270270
*/
271271

272+
/*!
273+
\fn template <typename T> QVector<T>::QVector(QArrayDataPointerRef<T> ref)
274+
\internal
275+
*/
276+
272277
/*! \fn template <typename T> QVector<T>::~QVector()
273278

274279
Destroys the vector.

0 commit comments

Comments
 (0)