summaryrefslogtreecommitdiffstats
path: root/logic/LegacyUpdate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-01-31 16:59:03 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-02 11:30:24 +0200
commit6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f (patch)
tree28aaf76918d1ff0ffe2a437573bb1ab7a012c4ec /logic/LegacyUpdate.cpp
parente508728246043fcaf8bee565e73b15e15eb2e531 (diff)
downloadMultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.gz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.lz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.tar.xz
MultiMC-6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f.zip
NOISSUE Split MultiMC app object into MultiMC and Env
Diffstat (limited to 'logic/LegacyUpdate.cpp')
-rw-r--r--logic/LegacyUpdate.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/logic/LegacyUpdate.cpp b/logic/LegacyUpdate.cpp
index 30f781ab..d955d456 100644
--- a/logic/LegacyUpdate.cpp
+++ b/logic/LegacyUpdate.cpp
@@ -25,13 +25,13 @@
#include "logic/minecraft/MinecraftVersionList.h"
#include "logic/BaseInstance.h"
#include "logic/LegacyInstance.h"
-#include "MultiMC.h"
+#include "logic/Env.h"
#include "logic/ModList.h"
#include "logger/QsLog.h"
#include "logic/net/URLConstants.h"
#include "JarUtils.h"
-
+#include "MultiMC.h"
LegacyUpdate::LegacyUpdate(BaseInstance *inst, QObject *parent) : Task(parent), m_inst(inst)
{
@@ -110,7 +110,7 @@ void LegacyUpdate::fmllibsStart()
// download missing libs to our place
setStatus(tr("Dowloading FML libraries..."));
auto dljob = new NetJob("FML libraries");
- auto metacache = MMC->metacache();
+ auto metacache = ENV.metacache();
for (auto &lib : fmlLibsToProcess)
{
auto entry = metacache->resolveEntry("fmllibs", lib.filename);
@@ -133,7 +133,7 @@ void LegacyUpdate::fmllibsFinished()
{
setStatus(tr("Copying FML libraries into the instance..."));
LegacyInstance *inst = (LegacyInstance *)m_inst;
- auto metacache = MMC->metacache();
+ auto metacache = ENV.metacache();
int index = 0;
for (auto &lib : fmlLibsToProcess)
{
@@ -197,7 +197,7 @@ void LegacyUpdate::lwjglStart()
QString url = version->url();
QUrl realUrl(url);
QString hostname = realUrl.host();
- auto worker = MMC->qnam();
+ auto worker = ENV.qnam();
QNetworkRequest req(realUrl);
req.setRawHeader("Host", hostname.toLatin1());
req.setHeader(QNetworkRequest::UserAgentHeader, "MultiMC/5.0 (Cached)");
@@ -222,7 +222,7 @@ void LegacyUpdate::lwjglFinished(QNetworkReply *reply)
"a row. YMMV");
return;
}
- auto worker = MMC->qnam();
+ auto worker = ENV.qnam();
// Here i check if there is a cookie for me in the reply and extract it
QList<QNetworkCookie> cookies =
qvariant_cast<QList<QNetworkCookie>>(reply->header(QNetworkRequest::SetCookieHeader));
@@ -376,7 +376,7 @@ void LegacyUpdate::jarStart()
auto dljob = new NetJob("Minecraft.jar for version " + version_id);
- auto metacache = MMC->metacache();
+ auto metacache = ENV.metacache();
auto entry = metacache->resolveEntry("versions", localPath);
dljob->addNetAction(CacheDownload::make(QUrl(urlstr), entry));
connect(dljob, SIGNAL(succeeded()), SLOT(jarFinished()));