diff options
Diffstat (limited to 'src/corelib/tools/qsharedpointer.h')
-rw-r--r-- | src/corelib/tools/qsharedpointer.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/corelib/tools/qsharedpointer.h b/src/corelib/tools/qsharedpointer.h index 98b38b97d3..5d47369687 100644 --- a/src/corelib/tools/qsharedpointer.h +++ b/src/corelib/tools/qsharedpointer.h @@ -48,6 +48,8 @@ # include <QtCore/qsharedpointer_impl.h> #else +#include <memory> // for std::shared_ptr + QT_BEGIN_NAMESPACE @@ -97,8 +99,8 @@ public: template <class X> QSharedPointer<X> constCast() const; template <class X> QSharedPointer<X> objectCast() const; - static inline QSharedPointer<T> create(); - static inline QSharedPointer<T> create(...); + template <typename... Args> + static inline QSharedPointer<T> create(Args &&... args); }; template <class T> @@ -167,6 +169,10 @@ template <class X, class T> QSharedPointer<X> qSharedPointerConstCast(const QSha template <class X, class T> QSharedPointer<X> qSharedPointerConstCast(const QWeakPointer<T> &src); template <class X, class T> QSharedPointer<X> qSharedPointerObjectCast(const QSharedPointer<T> &src); template <class X, class T> QSharedPointer<X> qSharedPointerObjectCast(const QWeakPointer<T> &src); +template <typename X, class T> std::shared_ptr<X> qobject_pointer_cast(const std::shared_ptr<T> &src); +template <typename X, class T> std::shared_ptr<X> qobject_pointer_cast(std::shared_ptr<T> &&src); +template <typename X, class T> std::shared_ptr<X> qSharedPointerObjectCast(const std::shared_ptr<T> &src); +template <typename X, class T> std::shared_ptr<X> qSharedPointerObjectCast(std::shared_ptr<T> &&src); template <class X, class T> QWeakPointer<X> qWeakPointerCast(const QWeakPointer<T> &src); |