diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h index 82eb80beffa..a7365aecf15 100644 --- a/src/corelib/tools/qsharedpointer.h +++ b/src/corelib/tools/qsharedpointer.h @@ -76,13 +76,15 @@ public: template QSharedPointer(std::nullptr_t, Deleter d); QSharedPointer(const QSharedPointer &other); QSharedPointer(const QWeakPointer &other); + QSharedPointer(QSharedPointer &&other) noexcept; ~QSharedPointer() { } QSharedPointer &operator=(const QSharedPointer &other); + QSharedPointer &operator=(QSharedPointer &&other) noexcept; QSharedPointer &operator=(const QWeakPointer &other); - void swap(QSharedPointer &other); + void swap(QSharedPointer &other) noexcept; QWeakPointer toWeakRef() const; @@ -114,18 +116,20 @@ public: // constructors: QWeakPointer(); - QWeakPointer(const QWeakPointer &other); + QWeakPointer(const QWeakPointer &other) noexcept; + QWeakPointer(QWeakPointer &&other) noexcept; QWeakPointer(const QSharedPointer &other); ~QWeakPointer(); - QWeakPointer &operator=(const QWeakPointer &other); + QWeakPointer &operator=(const QWeakPointer &other) noexcept; + QWeakPointer &operator=(QWeakPointer &&other) noexcept; QWeakPointer &operator=(const QSharedPointer &other); QWeakPointer(const QObject *other); QWeakPointer &operator=(const QObject *other); - void swap(QWeakPointer &other); + void swap(QWeakPointer &other) noexcept; T *data() const; void clear();