diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-07-03 09:42:40 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-04 06:03:33 +0000 |
commit | b196573c9aea72fc5b35a4a9e8a7085af88385e8 (patch) | |
tree | d4a1fdd646e81f779098b9332cb1b8bc3986ab3d /src/corelib/tools/qvector.h | |
parent | f9bcaeb8081e81ee6b491c56c7cc371abf084fca (diff) |
Fix QVector move assignment to return a reference
... instead of a copy.
This has been there since before Qt 5.0.
A quick grep shows it's the only instance of this mistake
in Qt.
Change-Id: I341df34f67544b8ed719254bd57237a9599efb46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r-- | src/corelib/tools/qvector.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 821fc9b68a..7bcd13e7d0 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -70,7 +70,7 @@ public: QVector<T> &operator=(const QVector<T> &v); #ifdef Q_COMPILER_RVALUE_REFS QVector(QVector<T> &&other) Q_DECL_NOTHROW : d(other.d) { other.d = Data::sharedNull(); } - QVector<T> operator=(QVector<T> &&other) Q_DECL_NOTHROW { swap(other); return *this; } + QVector<T> &operator=(QVector<T> &&other) Q_DECL_NOTHROW { swap(other); return *this; } #endif void swap(QVector<T> &other) Q_DECL_NOTHROW { qSwap(d, other.d); } #ifdef Q_COMPILER_INITIALIZER_LISTS |