Skip to content

Commit

Permalink
Revert "Revert "QVector: add a construction from QArrayDataPointerRef""
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Ville Voutilainen <[email protected]>
  • Loading branch information
owolff committed Sep 3, 2020
1 parent 85aa563 commit e4961b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/corelib/tools/qvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class QVector
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); }
Expand Down
5 changes: 5 additions & 0 deletions src/corelib/tools/qvector.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e4961b3

Please sign in to comment.