aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/modplatform/modpacksch/FTBPackInstallTask.cpp')
-rw-r--r--launcher/modplatform/modpacksch/FTBPackInstallTask.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
index 5fd85dfc..03570226 100644
--- a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
+++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
@@ -63,12 +63,11 @@ void PackInstallTask::executeTask()
return;
}
- auto *netJob = new NetJob("ModpacksCH::VersionFetch");
- auto searchUrl = QString(BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/%1/%2")
- .arg(m_pack.id).arg(version.id);
+ auto *netJob = new NetJob("ModpacksCH::VersionFetch", APPLICATION->network());
+ auto searchUrl = QString(BuildConfig.MODPACKSCH_API_BASE_URL + "public/modpack/%1/%2").arg(m_pack.id).arg(version.id);
netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
jobPtr = netJob;
- jobPtr->start(APPLICATION->network());
+ jobPtr->start();
QObject::connect(netJob, &NetJob::succeeded, this, &PackInstallTask::onDownloadSucceeded);
QObject::connect(netJob, &NetJob::failed, this, &PackInstallTask::onDownloadFailed);
@@ -113,7 +112,7 @@ void PackInstallTask::downloadPack()
{
setStatus(tr("Downloading mods..."));
- jobPtr = new NetJob(tr("Mod download"));
+ jobPtr = new NetJob(tr("Mod download"), APPLICATION->network());
for(auto file : m_version.files) {
if(file.serverOnly) continue;
@@ -159,7 +158,7 @@ void PackInstallTask::downloadPack()
setProgress(current, total);
});
- jobPtr->start(APPLICATION->network());
+ jobPtr->start();
}
void PackInstallTask::install()