aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/flame/FlameModel.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-01 16:39:04 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-06-25 11:09:25 -0700
commit9c10965997d873b0de56deef5d5ec5e768db1d8f (patch)
tree6be0af4993dcdc5d6634e2c8658ec71acbe72693 /launcher/ui/pages/modplatform/flame/FlameModel.cpp
parentaf6bf11793fb463fe62c99695e56ff6599612d05 (diff)
downloadPrismLauncher-9c10965997d873b0de56deef5d5ec5e768db1d8f.tar.gz
PrismLauncher-9c10965997d873b0de56deef5d5ec5e768db1d8f.tar.bz2
PrismLauncher-9c10965997d873b0de56deef5d5ec5e768db1d8f.zip
refactor: split out setting api headers for downloads
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/pages/modplatform/flame/FlameModel.cpp')
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
index d9d5ef5b..0a5fd9ce 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModel.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModel.cpp
@@ -3,6 +3,8 @@
#include "Application.h"
#include "ui/widgets/ProjectItem.h"
+#include "net/ApiDownload.h"
+
#include <Version.h>
#include <QtMath>
@@ -104,7 +106,7 @@ void ListModel::requestLogo(QString logo, QString url)
MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("FlamePacks", QString("logos/%1").arg(logo.section(".", 0, 0)));
auto job = new NetJob(QString("Flame Icon Download %1").arg(logo), APPLICATION->network());
- job->addNetAction(Net::Download::makeCached(QUrl(url), entry));
+ job->addNetAction(Net::ApiDownload::makeCached(QUrl(url), entry));
auto fullPath = entry->getFullPath();
QObject::connect(job, &NetJob::succeeded, this, [this, logo, fullPath, job] {
@@ -171,7 +173,7 @@ void ListModel::performPaginatedSearch()
.arg(currentSearchTerm)
.arg(currentSort + 1);
- netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
+ netJob->addNetAction(Net::ApiDownload::makeByteArray(QUrl(searchUrl), &response));
jobPtr = netJob;
jobPtr->start();
QObject::connect(netJob.get(), &NetJob::succeeded, this, &ListModel::searchRequestFinished);