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/atlauncher | |
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/atlauncher')
-rw-r--r-- | launcher/pages/modplatform/atlauncher/AtlListModel.cpp | 8 | ||||
-rw-r--r-- | launcher/pages/modplatform/atlauncher/AtlPage.cpp | 2 | ||||
-rw-r--r-- | launcher/pages/modplatform/atlauncher/AtlPage.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/launcher/pages/modplatform/atlauncher/AtlListModel.cpp b/launcher/pages/modplatform/atlauncher/AtlListModel.cpp index 99d12601..68234f6b 100644 --- a/launcher/pages/modplatform/atlauncher/AtlListModel.cpp +++ b/launcher/pages/modplatform/atlauncher/AtlListModel.cpp @@ -1,7 +1,7 @@ #include "AtlListModel.h" #include <BuildConfig.h> -#include <Launcher.h> +#include <Application.h> #include <Env.h> #include <Json.h> @@ -48,7 +48,7 @@ QVariant ListModel::data(const QModelIndex &index, int role) const { return (m_logoMap.value(pack.safeName)); } - auto icon = LAUNCHER->getThemedIcon("atlauncher-placeholder"); + auto icon = APPLICATION->getThemedIcon("atlauncher-placeholder"); auto url = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "launcher/images/%1.png").arg(pack.safeName.toLower()); ((ListModel *)this)->requestLogo(pack.safeName, url); @@ -134,7 +134,7 @@ void ListModel::getLogo(const QString &logo, const QString &logoUrl, LogoCallbac { if(m_logoMap.contains(logo)) { - callback(ENV.metacache()->resolveEntry("ATLauncherPacks", QString("logos/%1").arg(logo.section(".", 0, 0)))->getFullPath()); + callback(ENV->metacache()->resolveEntry("ATLauncherPacks", QString("logos/%1").arg(logo.section(".", 0, 0)))->getFullPath()); } else { @@ -167,7 +167,7 @@ void ListModel::requestLogo(QString file, QString url) return; } - MetaEntryPtr entry = ENV.metacache()->resolveEntry("ATLauncherPacks", QString("logos/%1").arg(file.section(".", 0, 0))); + MetaEntryPtr entry = ENV->metacache()->resolveEntry("ATLauncherPacks", QString("logos/%1").arg(file.section(".", 0, 0))); NetJob *job = new NetJob(QString("ATLauncher Icon Download %1").arg(file)); job->addNetAction(Net::Download::makeCached(QUrl(url), entry)); diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/pages/modplatform/atlauncher/AtlPage.cpp index cdf5cc86..5d286182 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.cpp +++ b/launcher/pages/modplatform/atlauncher/AtlPage.cpp @@ -133,7 +133,7 @@ QVector<QString> AtlPage::chooseOptionalMods(QVector<ATLauncher::VersionMod> mod } QString AtlPage::chooseVersion(Meta::VersionListPtr vlist, QString minecraftVersion) { - VersionSelectDialog vselect(vlist.get(), "Choose Version", LAUNCHER->activeWindow(), false); + VersionSelectDialog vselect(vlist.get(), "Choose Version", APPLICATION->activeWindow(), false); if (minecraftVersion != Q_NULLPTR) { vselect.setExactFilter(BaseVersionList::ParentVersionRole, minecraftVersion); vselect.setEmptyString(tr("No versions are currently available for Minecraft %1").arg(minecraftVersion)); diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.h b/launcher/pages/modplatform/atlauncher/AtlPage.h index 84c40656..7321021d 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.h +++ b/launcher/pages/modplatform/atlauncher/AtlPage.h @@ -21,7 +21,7 @@ #include <QWidget> #include <modplatform/atlauncher/ATLPackInstallTask.h> -#include "Launcher.h" +#include "Application.h" #include "pages/BasePage.h" #include "tasks/Task.h" @@ -45,7 +45,7 @@ public: } virtual QIcon icon() const override { - return LAUNCHER->getThemedIcon("atlauncher"); + return APPLICATION->getThemedIcon("atlauncher"); } virtual QString id() const override { |