summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-10-28 12:33:45 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-11-01 11:20:32 +0200
commit7cb215938880e33a76092c33d29f85c12f4209ce (patch)
tree9c6e1e19daf7f49673303137cbf1aa96a0c4a50c /src/corelib/tools/qsharedpointer.h
parente2e5f448ca20d904c6a14c2df6a0348cf60f5b52 (diff)
Match documentation of shared pointers to new definitions
We also have move semantics and noexcept. Pick-to: 6.2 Change-Id: Idcb1d39f79ff45738c641f8dd07fb71cf32d9aca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qsharedpointer.h')
-rw-r--r--src/corelib/tools/qsharedpointer.h12
1 files changed, 8 insertions, 4 deletions
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 <typename Deleter> QSharedPointer(std::nullptr_t, Deleter d);
QSharedPointer(const QSharedPointer<T> &other);
QSharedPointer(const QWeakPointer<T> &other);
+ QSharedPointer(QSharedPointer<T> &&other) noexcept;
~QSharedPointer() { }
QSharedPointer<T> &operator=(const QSharedPointer<T> &other);
+ QSharedPointer<T> &operator=(QSharedPointer<T> &&other) noexcept;
QSharedPointer<T> &operator=(const QWeakPointer<T> &other);
- void swap(QSharedPointer<T> &other);
+ void swap(QSharedPointer<T> &other) noexcept;
QWeakPointer<T> toWeakRef() const;
@@ -114,18 +116,20 @@ public:
// constructors:
QWeakPointer();
- QWeakPointer(const QWeakPointer<T> &other);
+ QWeakPointer(const QWeakPointer<T> &other) noexcept;
+ QWeakPointer(QWeakPointer<T> &&other) noexcept;
QWeakPointer(const QSharedPointer<T> &other);
~QWeakPointer();
- QWeakPointer<T> &operator=(const QWeakPointer<T> &other);
+ QWeakPointer<T> &operator=(const QWeakPointer<T> &other) noexcept;
+ QWeakPointer<T> &operator=(QWeakPointer<T> &&other) noexcept;
QWeakPointer<T> &operator=(const QSharedPointer<T> &other);
QWeakPointer(const QObject *other);
QWeakPointer<T> &operator=(const QObject *other);
- void swap(QWeakPointer<T> &other);
+ void swap(QWeakPointer<T> &other) noexcept;
T *data() const;
void clear();