diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-01-31 16:59:03 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-02 11:30:24 +0200 |
commit | 6f3aa65bd69f5155fa1ee56dee840e2e7e1d3c6f (patch) | |
tree | 28aaf76918d1ff0ffe2a437573bb1ab7a012c4ec /logic/minecraft | |
parent | e508728246043fcaf8bee565e73b15e15eb2e531 (diff) | |
download | MultiMC-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/minecraft')
-rw-r--r-- | logic/minecraft/MinecraftProcess.cpp | 2 | ||||
-rw-r--r-- | logic/minecraft/MinecraftVersion.cpp | 4 | ||||
-rw-r--r-- | logic/minecraft/MinecraftVersionList.cpp | 4 | ||||
-rw-r--r-- | logic/minecraft/VersionBuilder.cpp | 1 |
4 files changed, 4 insertions, 7 deletions
diff --git a/logic/minecraft/MinecraftProcess.cpp b/logic/minecraft/MinecraftProcess.cpp index 0fc3f067..97eb8ee8 100644 --- a/logic/minecraft/MinecraftProcess.cpp +++ b/logic/minecraft/MinecraftProcess.cpp @@ -151,7 +151,7 @@ QStringList MinecraftProcess::javaArguments() const args << "-Duser.language=en"; if (!m_nativeFolder.isEmpty()) args << QString("-Djava.library.path=%1").arg(m_nativeFolder); - args << "-jar" << PathCombine(MMC->bin(), "jars", "NewLaunch.jar"); + args << "-jar" << PathCombine(QCoreApplication::applicationDirPath(), "jars", "NewLaunch.jar"); return args; } diff --git a/logic/minecraft/MinecraftVersion.cpp b/logic/minecraft/MinecraftVersion.cpp index 32682bfb..28afb5e7 100644 --- a/logic/minecraft/MinecraftVersion.cpp +++ b/logic/minecraft/MinecraftVersion.cpp @@ -152,9 +152,7 @@ QString MinecraftVersion::getPatchFilename() bool MinecraftVersion::needsUpdate() { - auto settings = MMC->settings(); - bool result = m_versionSource == Remote || (hasUpdate() && settings->get("AutoUpdateMinecraftVersions").toBool()); - return result; + return m_versionSource == Remote || hasUpdate(); } bool MinecraftVersion::hasUpdate() diff --git a/logic/minecraft/MinecraftVersionList.cpp b/logic/minecraft/MinecraftVersionList.cpp index 68e93d54..26b51731 100644 --- a/logic/minecraft/MinecraftVersionList.cpp +++ b/logic/minecraft/MinecraftVersionList.cpp @@ -18,7 +18,7 @@ #include <QtAlgorithms> #include <QtNetwork> -#include "MultiMC.h" +#include "logic/Env.h" #include "MMCError.h" #include "MinecraftVersionList.h" @@ -399,7 +399,7 @@ MCVListLoadTask::MCVListLoadTask(MinecraftVersionList *vlist) void MCVListLoadTask::executeTask() { setStatus(tr("Loading instance version list...")); - auto worker = MMC->qnam(); + auto worker = ENV.qnam(); vlistReply = worker->get(QNetworkRequest( QUrl("http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + "versions.json"))); connect(vlistReply, SIGNAL(finished()), this, SLOT(list_downloaded())); diff --git a/logic/minecraft/VersionBuilder.cpp b/logic/minecraft/VersionBuilder.cpp index 7f77b493..2a7096e8 100644 --- a/logic/minecraft/VersionBuilder.cpp +++ b/logic/minecraft/VersionBuilder.cpp @@ -26,7 +26,6 @@ #include <modutils.h> #include <pathutils.h> -#include "MultiMC.h" #include "logic/minecraft/VersionBuilder.h" #include "logic/minecraft/MinecraftProfile.h" #include "logic/minecraft/OneSixRule.h" |