diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-21 23:21:12 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-21 23:21:12 +0100 |
commit | 69213b1206e97f7d4db4270a4b3b0af41dc9e6fc (patch) | |
tree | b53ca69422ce22cceee9e648171a678679075c1a /launcher/pages/modplatform/legacy_ftb | |
parent | c2c56a2f6ceaedb8a3fa88c848b345db0fec7f9c (diff) | |
download | PrismLauncher-69213b1206e97f7d4db4270a4b3b0af41dc9e6fc.tar.gz PrismLauncher-69213b1206e97f7d4db4270a4b3b0af41dc9e6fc.tar.bz2 PrismLauncher-69213b1206e97f7d4db4270a4b3b0af41dc9e6fc.zip |
NOISSUE continue refactoring things to make tests pass
Diffstat (limited to 'launcher/pages/modplatform/legacy_ftb')
-rw-r--r-- | launcher/pages/modplatform/legacy_ftb/ListModel.cpp | 7 | ||||
-rw-r--r-- | launcher/pages/modplatform/legacy_ftb/Page.cpp | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/launcher/pages/modplatform/legacy_ftb/ListModel.cpp b/launcher/pages/modplatform/legacy_ftb/ListModel.cpp index dfef278b..5fa932b7 100644 --- a/launcher/pages/modplatform/legacy_ftb/ListModel.cpp +++ b/launcher/pages/modplatform/legacy_ftb/ListModel.cpp @@ -8,7 +8,6 @@ #include <QLabel> #include <RWStorage.h> -#include <Env.h> #include <BuildConfig.h> @@ -216,7 +215,7 @@ void ListModel::requestLogo(QString file) return; } - MetaEntryPtr entry = ENV->metacache()->resolveEntry("FTBPacks", QString("logos/%1").arg(file.section(".", 0, 0))); + MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("FTBPacks", QString("logos/%1").arg(file.section(".", 0, 0))); NetJob *job = new NetJob(QString("FTB Icon Download for %1").arg(file)); job->addNetAction(Net::Download::makeCached(QUrl(QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "static/%1").arg(file)), entry)); @@ -235,7 +234,7 @@ void ListModel::requestLogo(QString file) emit logoFailed(file); }); - job->start(); + job->start(APPLICATION->network()); m_loadingLogos.append(file); } @@ -244,7 +243,7 @@ void ListModel::getLogo(const QString &logo, LogoCallback callback) { if(m_logoMap.contains(logo)) { - callback(ENV->metacache()->resolveEntry("FTBPacks", QString("logos/%1").arg(logo.section(".", 0, 0)))->getFullPath()); + callback(APPLICATION->metacache()->resolveEntry("FTBPacks", QString("logos/%1").arg(logo.section(".", 0, 0)))->getFullPath()); } else { diff --git a/launcher/pages/modplatform/legacy_ftb/Page.cpp b/launcher/pages/modplatform/legacy_ftb/Page.cpp index 93002a87..ecd9fece 100644 --- a/launcher/pages/modplatform/legacy_ftb/Page.cpp +++ b/launcher/pages/modplatform/legacy_ftb/Page.cpp @@ -16,7 +16,7 @@ namespace LegacyFTB { Page::Page(NewInstanceDialog* dialog, QWidget *parent) : QWidget(parent), dialog(dialog), ui(new Ui::Page) { - ftbFetchTask.reset(new PackFetchTask()); + ftbFetchTask.reset(new PackFetchTask(APPLICATION->network())); ftbPrivatePacks.reset(new PrivatePackManager()); ui->setupUi(this); @@ -133,7 +133,7 @@ void Page::suggestCurrent() return; } - dialog->setSuggestedPack(selected.name, new PackInstallTask(selected, selectedVersion)); + dialog->setSuggestedPack(selected.name, new PackInstallTask(APPLICATION->network(), selected, selectedVersion)); QString editedLogoName; if(selected.logo.toLower().startsWith("ftb")) { |