From 9579231ccc36d9d32f4d5571ced91e8fe7851643 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Fri, 31 Dec 2021 05:27:59 +0100 Subject: NOISSUE fix build and change how NetJob is used Feed it network upfront... --- launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'launcher/ui/pages/modplatform/atlauncher') diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp index 82e383ca..ef9a9268 100644 --- a/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp +++ b/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp @@ -86,11 +86,11 @@ void ListModel::request() modpacks.clear(); endResetModel(); - auto *netJob = new NetJob("Atl::Request"); + auto *netJob = new NetJob("Atl::Request", APPLICATION->network()); auto url = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "launcher/json/packsnew.json"); netJob->addNetAction(Net::Download::makeByteArray(QUrl(url), &response)); jobPtr = netJob; - jobPtr->start(APPLICATION->network()); + jobPtr->start(); QObject::connect(netJob, &NetJob::succeeded, this, &ListModel::requestFinished); QObject::connect(netJob, &NetJob::failed, this, &ListModel::requestFailed); @@ -183,7 +183,7 @@ void ListModel::requestLogo(QString file, QString url) } MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("ATLauncherPacks", QString("logos/%1").arg(file.section(".", 0, 0))); - NetJob *job = new NetJob(QString("ATLauncher Icon Download %1").arg(file)); + NetJob *job = new NetJob(QString("ATLauncher Icon Download %1").arg(file), APPLICATION->network()); job->addNetAction(Net::Download::makeCached(QUrl(url), entry)); auto fullPath = entry->getFullPath(); @@ -201,7 +201,7 @@ void ListModel::requestLogo(QString file, QString url) emit logoFailed(file); }); - job->start(APPLICATION->network()); + job->start(); m_loadingLogos.append(file); } -- cgit