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
This commit is contained in:
Petr Mrázek
2015-01-11 22:04:31 +01:00
parent 1151037f96
commit 0886786bb5
7 changed files with 130 additions and 46 deletions

View File

@ -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;