diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h index a7e8429469a..bb24f3e6f2c 100644 --- a/src/corelib/tools/qarraydatapointer.h +++ b/src/corelib/tools/qarraydatapointer.h @@ -103,7 +103,8 @@ public: QArrayDataPointer &operator=(QArrayDataPointer &&other) noexcept { - this->swap(other); + QArrayDataPointer moved(std::move(other)); + swap(moved); return *this; }