Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into skin_selector
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -36,6 +36,14 @@
|
||||
*/
|
||||
|
||||
#include "NetJob.h"
|
||||
#include "Application.h"
|
||||
|
||||
NetJob::NetJob(QString job_name, shared_qobject_ptr<QNetworkAccessManager> network, int max_concurrent)
|
||||
: ConcurrentTask(nullptr,
|
||||
job_name,
|
||||
max_concurrent < 0 ? APPLICATION->settings()->get("NumberOfConcurrentDownloads").toInt() : max_concurrent)
|
||||
, m_network(network)
|
||||
{}
|
||||
|
||||
auto NetJob::addNetAction(NetAction::Ptr action) -> bool
|
||||
{
|
||||
|
@ -52,9 +52,7 @@ class NetJob : public ConcurrentTask {
|
||||
public:
|
||||
using Ptr = shared_qobject_ptr<NetJob>;
|
||||
|
||||
explicit NetJob(QString job_name, shared_qobject_ptr<QNetworkAccessManager> network, int max_concurrent = 6)
|
||||
: ConcurrentTask(nullptr, job_name, max_concurrent), m_network(network)
|
||||
{}
|
||||
explicit NetJob(QString job_name, shared_qobject_ptr<QNetworkAccessManager> network, int max_concurrent = -1);
|
||||
~NetJob() override = default;
|
||||
|
||||
void startNext() override;
|
||||
|
Reference in New Issue
Block a user