summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qsharedpointer.h
diff options
context:
space:
mode:
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 d9de48b7f43..431868ee086 100644
--- a/src/corelib/tools/qsharedpointer.h
+++ b/src/corelib/tools/qsharedpointer.h
@@ -131,6 +131,14 @@ public:
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);
template<class T, class X> bool operator!=(const QSharedPointer<T> &ptr1, const QSharedPointer<X> &ptr2);
template<class T, class X> bool operator==(const QSharedPointer<T> &ptr1, const X *ptr2);