From 0886786bb56e1ebfb53716127fd3ff0366e9a9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 11 Jan 2015 22:04:31 +0100 Subject: GH-721 Redo internal NetJob implementation. NetJob is now using its own task queue and does not start more than 6 actions at the same time --- logic/net/NetAction.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'logic/net/NetAction.h') diff --git a/logic/net/NetAction.h b/logic/net/NetAction.h index eb3153d2..803c9259 100644 --- a/logic/net/NetAction.h +++ b/logic/net/NetAction.h @@ -29,7 +29,7 @@ enum JobStatus }; typedef std::shared_ptr NetActionPtr; -class NetAction : public QObject +class NetAction : public QObject, public std::enable_shared_from_this { Q_OBJECT protected: @@ -51,6 +51,11 @@ public: { return m_failures; } + NetActionPtr getSharedPtr() + { + return shared_from_this(); + } + public: /// the network reply std::shared_ptr m_reply; -- cgit v1.2.3