summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-12-20 21:45:11 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-12-22 08:40:23 +0100
commit5dc0f52e7047ca5927e6741fda554cb090184b71 (patch)
treed88f7b1f5f3bd73ad3f85bb4b340a053da790047 /src/corelib/tools/qsharedpointer.h
parentb91e87a8db06713cb5891949c1bf77ed43bfc9c3 (diff)
[doc] QSharedPointer: add some missing docs
Added docs for - move-ctor, -assignment operator - move-construction and -assignment from QSP<X> - qHash() There's more stuff missing, but I declare 'twas enough qdoc wrangling for this round. The texts are taken from other smart pointer docs, esp. QESDP, so they're consistent. Fixes: QTBUG-83134 Fixes: QTBUG-63700 Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Iff980d043e1635ed6cfdd3113c68bc23f3a0bad7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qsharedpointer.h')
-rw-r--r--src/corelib/tools/qsharedpointer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h
index a18304cae6e..2a60f3ca5e2 100644
--- a/src/corelib/tools/qsharedpointer.h
+++ b/src/corelib/tools/qsharedpointer.h
@@ -48,6 +48,11 @@ public:
QSharedPointer<T> &operator=(QSharedPointer<T> &&other) noexcept;
QSharedPointer<T> &operator=(const QWeakPointer<T> &other);
+ template <class X>
+ QSharedPointer(QSharedPointer<X> && other) noexcept;
+ template <class X>
+ QSharedPointer &operator=(QSharedPointer<X> && other) noexcept;
+
void swap(QSharedPointer<T> &other) noexcept;
QWeakPointer<T> toWeakRef() const;
@@ -70,6 +75,9 @@ public:
};
template <class T>
+size_t qHash(const QSharedPointer<T> &key, size_t seed = 0) noexcept;
+
+template <class T>
class QWeakPointer
{
public: