Add missing rvalue overloads of operator+=() and operator<<()
They were forgotten when the overloads for append()/push_back() were added in Qt 5.6 [ChangeLog][QtCore][QVarLengthArray] Added missing rvalue overload of operator+=() and operator<<() [ChangeLog][QtCore][QVector] Added missing rvalue overload of operator+=() and operator<<() Change-Id: I20fedfba2bf282773bd1f9cf2c8ec06f05896a7d Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
808adeb7bc
commit
4dee5446be
|
|
@ -175,8 +175,12 @@ public:
|
|||
void append(const T *buf, int size);
|
||||
inline QVarLengthArray<T, Prealloc> &operator<<(const T &t)
|
||||
{ append(t); return *this; }
|
||||
inline QVarLengthArray<T, Prealloc> &operator<<(T &&t)
|
||||
{ append(t); return *this; }
|
||||
inline QVarLengthArray<T, Prealloc> &operator+=(const T &t)
|
||||
{ append(t); return *this; }
|
||||
inline QVarLengthArray<T, Prealloc> &operator+=(T &&t)
|
||||
{ append(t); return *this; }
|
||||
|
||||
void prepend(T &&t);
|
||||
void prepend(const T &t);
|
||||
|
|
|
|||
|
|
@ -832,6 +832,14 @@
|
|||
\sa append(), operator+=()
|
||||
*/
|
||||
|
||||
/*! \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc> &QVarLengthArray<T, Prealloc>::operator<<(T &&value)
|
||||
\since 5.11
|
||||
|
||||
\overload
|
||||
|
||||
\sa append(), operator+=()
|
||||
*/
|
||||
|
||||
/*! \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc> &QVarLengthArray<T, Prealloc>::operator+=(const T &value)
|
||||
|
||||
\since 4.8
|
||||
|
|
@ -840,6 +848,14 @@
|
|||
\sa append(), operator<<()
|
||||
*/
|
||||
|
||||
/*! \fn template<class T, int Prealloc> QVarLengthArray<T, Prealloc> &QVarLengthArray<T, Prealloc>::operator+=(T &&value)
|
||||
\since 5.11
|
||||
|
||||
\overload
|
||||
|
||||
\sa append(), operator<<()
|
||||
*/
|
||||
|
||||
/*! \fn template<class T, int Prealloc> int QVarLengthArray<T, Prealloc>::indexOf(const T &value, int from = 0) const
|
||||
|
||||
\since 5.3
|
||||
|
|
|
|||
|
|
@ -283,6 +283,10 @@ public:
|
|||
{ append(t); return *this; }
|
||||
inline QVector<T> &operator<<(const QVector<T> &l)
|
||||
{ *this += l; return *this; }
|
||||
inline QVector<T> &operator+=(T &&t)
|
||||
{ append(t); return *this; }
|
||||
inline QVector<T> &operator<<(T &&t)
|
||||
{ append(t); return *this; }
|
||||
|
||||
QList<T> toList() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -1162,6 +1162,14 @@
|
|||
\sa append(), operator<<()
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> void QVector<T>::operator+=(T &&value)
|
||||
\since 5.11
|
||||
|
||||
\overload
|
||||
|
||||
\sa append(), operator<<()
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> QVector<T> QVector<T>::operator+(const QVector<T> &other) const
|
||||
|
||||
Returns a vector that contains all the items in this vector
|
||||
|
|
@ -1178,6 +1186,15 @@
|
|||
\sa append(), operator+=()
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> QVector<T> &QVector<T>::operator<<(T &&value)
|
||||
\since 5.11
|
||||
|
||||
\overload
|
||||
|
||||
\sa append(), operator+=()
|
||||
*/
|
||||
|
||||
|
||||
/*! \fn template <typename T> QVector<T> &QVector<T>::operator<<(const QVector<T> &other)
|
||||
|
||||
Appends \a other to the vector and returns a reference to the
|
||||
|
|
|
|||
Loading…
Reference in New Issue