aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/instance
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/instance
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/instance')
-rw-r--r--launcher/ui/pages/instance/ManagedPackPage.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/launcher/ui/pages/instance/ManagedPackPage.cpp b/launcher/ui/pages/instance/ManagedPackPage.cpp
index d0701a7a..68119f06 100644
--- a/launcher/ui/pages/instance/ManagedPackPage.cpp
+++ b/launcher/ui/pages/instance/ManagedPackPage.cpp
@@ -23,6 +23,8 @@
#include "ui/dialogs/CustomMessageBox.h"
#include "ui/dialogs/ProgressDialog.h"
+#include "net/ApiDownload.h"
+
/** This is just to override the combo box popup behavior so that the combo box doesn't take the whole screen.
* ... thanks Qt.
*/
@@ -226,7 +228,7 @@ void ModrinthManagedPackPage::parseManagedPack()
QString id = m_inst->getManagedPackID();
- m_fetch_job->addNetAction(Net::Download::makeByteArray(QString("%1/project/%2/version").arg(BuildConfig.MODRINTH_PROD_URL, id), response.get()));
+ m_fetch_job->addNetAction(Net::ApiDownload::makeByteArray(QString("%1/project/%2/version").arg(BuildConfig.MODRINTH_PROD_URL, id), response.get()));
QObject::connect(m_fetch_job.get(), &NetJob::succeeded, this, [this, response, id] {
QJsonParseError parse_error{};
@@ -369,7 +371,7 @@ void FlameManagedPackPage::parseManagedPack()
QString id = m_inst->getManagedPackID();
- m_fetch_job->addNetAction(Net::Download::makeByteArray(QString("%1/mods/%2/files").arg(BuildConfig.FLAME_BASE_URL, id), response.get()));
+ m_fetch_job->addNetAction(Net::ApiDownload::makeByteArray(QString("%1/mods/%2/files").arg(BuildConfig.FLAME_BASE_URL, id), response.get()));
QObject::connect(m_fetch_job.get(), &NetJob::succeeded, this, [this, response, id] {
QJsonParseError parse_error{};