diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-20 16:22:22 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-20 16:22:22 +0100 |
commit | 0c861db7a201c813530e703257f286257f39872f (patch) | |
tree | 5ba0e10632ecef461f50bcc6e32512062932a193 /launcher/pages/modplatform/legacy_ftb | |
parent | eafeb64decf9fa3b4ae9617abc777698e51b24d0 (diff) | |
download | PrismLauncher-0c861db7a201c813530e703257f286257f39872f.tar.gz PrismLauncher-0c861db7a201c813530e703257f286257f39872f.tar.bz2 PrismLauncher-0c861db7a201c813530e703257f286257f39872f.zip |
NOISSUE Some happy little refactors
Diffstat (limited to 'launcher/pages/modplatform/legacy_ftb')
-rw-r--r-- | launcher/pages/modplatform/legacy_ftb/ListModel.cpp | 8 | ||||
-rw-r--r-- | launcher/pages/modplatform/legacy_ftb/Page.cpp | 2 | ||||
-rw-r--r-- | launcher/pages/modplatform/legacy_ftb/Page.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/launcher/pages/modplatform/legacy_ftb/ListModel.cpp b/launcher/pages/modplatform/legacy_ftb/ListModel.cpp index 78063c5f..dfef278b 100644 --- a/launcher/pages/modplatform/legacy_ftb/ListModel.cpp +++ b/launcher/pages/modplatform/legacy_ftb/ListModel.cpp @@ -1,5 +1,5 @@ #include "ListModel.h" -#include "Launcher.h" +#include "Application.h" #include <MMCStrings.h> #include <Version.h> @@ -130,7 +130,7 @@ QVariant ListModel::data(const QModelIndex &index, int role) const { return (m_logoMap.value(pack.logo)); } - QIcon icon = LAUNCHER->getThemedIcon("screenshot-placeholder"); + QIcon icon = APPLICATION->getThemedIcon("screenshot-placeholder"); ((ListModel *)this)->requestLogo(pack.logo); return icon; } @@ -216,7 +216,7 @@ void ListModel::requestLogo(QString file) return; } - MetaEntryPtr entry = ENV.metacache()->resolveEntry("FTBPacks", QString("logos/%1").arg(file.section(".", 0, 0))); + MetaEntryPtr entry = ENV->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)); @@ -244,7 +244,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(ENV->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 6b6a7dcd..93002a87 100644 --- a/launcher/pages/modplatform/legacy_ftb/Page.cpp +++ b/launcher/pages/modplatform/legacy_ftb/Page.cpp @@ -3,7 +3,7 @@ #include <QInputDialog> -#include "Launcher.h" +#include "Application.h" #include "dialogs/CustomMessageBox.h" #include "dialogs/NewInstanceDialog.h" #include "modplatform/legacy_ftb/PackFetchTask.h" diff --git a/launcher/pages/modplatform/legacy_ftb/Page.h b/launcher/pages/modplatform/legacy_ftb/Page.h index 6159cd9d..4c6fb35e 100644 --- a/launcher/pages/modplatform/legacy_ftb/Page.h +++ b/launcher/pages/modplatform/legacy_ftb/Page.h @@ -20,7 +20,7 @@ #include <QTextBrowser> #include "pages/BasePage.h" -#include <Launcher.h> +#include <Application.h> #include "tasks/Task.h" #include "modplatform/legacy_ftb/PackHelpers.h" #include "modplatform/legacy_ftb/PackFetchTask.h" @@ -54,7 +54,7 @@ public: } QIcon icon() const override { - return LAUNCHER->getThemedIcon("ftb_logo"); + return APPLICATION->getThemedIcon("ftb_logo"); } QString id() const override { |