diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-08-14 02:33:31 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-08-14 23:22:54 +0200 |
commit | 042f3ef55c0b469f438542152c4eb02b0789ea3c (patch) | |
tree | 03e0c15b200786558babd0fe58edac88ed1bfd1e /api/logic/QObjectPtr.h | |
parent | 2f0441b3c1cd9fc3bcb176d2852da8f92a6e6777 (diff) | |
download | MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.gz MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.lz MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.tar.xz MultiMC-042f3ef55c0b469f438542152c4eb02b0789ea3c.zip |
GH-352 Make OneSix instance update downloads cancellable
Diffstat (limited to 'api/logic/QObjectPtr.h')
-rw-r--r-- | api/logic/QObjectPtr.h | 4 |
1 files changed, 4 insertions, 0 deletions
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<T> &other) + { + m_ptr = other.m_ptr; + } void reset() { m_ptr.reset(); |