NOISSUE Some happy little refactors
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#include "FlameModel.h"
|
||||
#include "Launcher.h"
|
||||
#include "Application.h"
|
||||
#include <Json.h>
|
||||
|
||||
#include <MMCStrings.h>
|
||||
@ -62,7 +62,7 @@ QVariant ListModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
return (m_logoMap.value(pack.logoName));
|
||||
}
|
||||
QIcon icon = LAUNCHER->getThemedIcon("screenshot-placeholder");
|
||||
QIcon icon = APPLICATION->getThemedIcon("screenshot-placeholder");
|
||||
((ListModel *)this)->requestLogo(pack.logoName, pack.logoUrl);
|
||||
return icon;
|
||||
}
|
||||
@ -100,7 +100,7 @@ void ListModel::requestLogo(QString logo, QString url)
|
||||
return;
|
||||
}
|
||||
|
||||
MetaEntryPtr entry = ENV.metacache()->resolveEntry("FlamePacks", QString("logos/%1").arg(logo.section(".", 0, 0)));
|
||||
MetaEntryPtr entry = ENV->metacache()->resolveEntry("FlamePacks", QString("logos/%1").arg(logo.section(".", 0, 0)));
|
||||
NetJob *job = new NetJob(QString("Flame Icon Download %1").arg(logo));
|
||||
job->addNetAction(Net::Download::makeCached(QUrl(url), entry));
|
||||
|
||||
@ -128,7 +128,7 @@ void ListModel::getLogo(const QString &logo, const QString &logoUrl, LogoCallbac
|
||||
{
|
||||
if(m_logoMap.contains(logo))
|
||||
{
|
||||
callback(ENV.metacache()->resolveEntry("FlamePacks", QString("logos/%1").arg(logo.section(".", 0, 0)))->getFullPath());
|
||||
callback(ENV->metacache()->resolveEntry("FlamePacks", QString("logos/%1").arg(logo.section(".", 0, 0)))->getFullPath());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "FlamePage.h"
|
||||
#include "ui_FlamePage.h"
|
||||
|
||||
#include "Launcher.h"
|
||||
#include "Application.h"
|
||||
#include <Json.h>
|
||||
#include "dialogs/NewInstanceDialog.h"
|
||||
#include <InstanceImportTask.h>
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "pages/BasePage.h"
|
||||
#include <Launcher.h>
|
||||
#include <Application.h>
|
||||
#include "tasks/Task.h"
|
||||
#include <modplatform/flame/FlamePackIndex.h>
|
||||
|
||||
@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
virtual QIcon icon() const override
|
||||
{
|
||||
return LAUNCHER->getThemedIcon("flame");
|
||||
return APPLICATION->getThemedIcon("flame");
|
||||
}
|
||||
virtual QString id() const override
|
||||
{
|
||||
|
Reference in New Issue
Block a user