diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 1423449a69..e7b23157db 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -327,6 +327,12 @@ public: return *this; } #ifdef Q_COMPILER_RVALUE_REFS + inline QSharedPointer(QSharedPointer &&other) + : value(other.value), d(other.d) + { + other.d = 0; + other.value = 0; + } inline QSharedPointer &operator=(QSharedPointer &&other) { swap(other);