diff options
Diffstat (limited to 'src/corelib/tools/qsharedpointer.h')
-rw-r--r-- | src/corelib/tools/qsharedpointer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h index 34b4bfbb12..431868ee08 100644 --- a/src/corelib/tools/qsharedpointer.h +++ b/src/corelib/tools/qsharedpointer.h @@ -122,10 +122,21 @@ public: QWeakPointer(const QObject *other); QWeakPointer<T> operator=(const QObject *other); + void swap(QWeakPointer<T> &other); + T *data() const; void clear(); QSharedPointer<T> toStrongRef() const; + QSharedPointer<T> lock() const; +}; + +template <class T> +class QEnableSharedFromThis +{ +public: + QSharedPointer<T> sharedFromThis(); + QSharedPointer<const T> sharedFromThis() const; }; template<class T, class X> bool operator==(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2); |