From 042f3ef55c0b469f438542152c4eb02b0789ea3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 14 Aug 2016 02:33:31 +0200 Subject: GH-352 Make OneSix instance update downloads cancellable --- api/logic/QObjectPtr.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'api/logic/QObjectPtr.h') diff --git a/api/logic/QObjectPtr.h b/api/logic/QObjectPtr.h index b81b3234..000d228d 100644 --- a/api/logic/QObjectPtr.h +++ b/api/logic/QObjectPtr.h @@ -48,6 +48,10 @@ public: using namespace std::placeholders; m_ptr.reset(wrap, std::bind(&QObject::deleteLater, _1)); } + void reset(const shared_qobject_ptr &other) + { + m_ptr = other.m_ptr; + } void reset() { m_ptr.reset(); -- cgit v1.2.3