summaryrefslogtreecommitdiffstats
path: root/logic/net/NetAction.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-01-11 22:04:31 +0100
committerPetr Mrázek <peterix@gmail.com>2015-01-11 22:04:31 +0100
commit0886786bb56e1ebfb53716127fd3ff0366e9a9f3 (patch)
tree4c65561d1e3b394a834e69a77df1243bd2d2c5f1 /logic/net/NetAction.h
parent1151037f968628cd659f06457f9ca7403f77f071 (diff)
downloadMultiMC-0886786bb56e1ebfb53716127fd3ff0366e9a9f3.tar
MultiMC-0886786bb56e1ebfb53716127fd3ff0366e9a9f3.tar.gz
MultiMC-0886786bb56e1ebfb53716127fd3ff0366e9a9f3.tar.lz
MultiMC-0886786bb56e1ebfb53716127fd3ff0366e9a9f3.tar.xz
MultiMC-0886786bb56e1ebfb53716127fd3ff0366e9a9f3.zip
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
Diffstat (limited to 'logic/net/NetAction.h')
-rw-r--r--logic/net/NetAction.h7
1 files changed, 6 insertions, 1 deletions
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<class NetAction> NetActionPtr;
-class NetAction : public QObject
+class NetAction : public QObject, public std::enable_shared_from_this<NetAction>
{
Q_OBJECT
protected:
@@ -51,6 +51,11 @@ public:
{
return m_failures;
}
+ NetActionPtr getSharedPtr()
+ {
+ return shared_from_this();
+ }
+
public:
/// the network reply
std::shared_ptr<QNetworkReply> m_reply;