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:
@ -89,4 +89,4 @@ QNetworkReply* Download::getReply(QNetworkRequest& request)
|
||||
{
|
||||
return m_network->get(request);
|
||||
}
|
||||
} // namespace Net
|
||||
} // namespace Net
|
||||
|
@ -36,14 +36,20 @@
|
||||
*/
|
||||
|
||||
#include "NetJob.h"
|
||||
#if defined(LAUNCHER_APPLICATION)
|
||||
#include "Application.h"
|
||||
#endif
|
||||
|
||||
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)
|
||||
{}
|
||||
: ConcurrentTask(nullptr, job_name), m_network(network)
|
||||
{
|
||||
#if defined(LAUNCHER_APPLICATION)
|
||||
if (max_concurrent < 0)
|
||||
max_concurrent = APPLICATION->settings()->get("NumberOfConcurrentDownloads").toInt();
|
||||
#endif
|
||||
if (max_concurrent > 0)
|
||||
setMaxConcurrent(max_concurrent);
|
||||
}
|
||||
|
||||
auto NetJob::addNetAction(NetAction::Ptr action) -> bool
|
||||
{
|
||||
|
@ -47,6 +47,7 @@
|
||||
#if defined(LAUNCHER_APPLICATION)
|
||||
#include "Application.h"
|
||||
#endif
|
||||
#include "BuildConfig.h"
|
||||
|
||||
#include "net/NetAction.h"
|
||||
|
||||
|
Reference in New Issue
Block a user