diff options
Diffstat (limited to 'launcher/minecraft/Component.cpp')
-rw-r--r-- | launcher/minecraft/Component.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/launcher/minecraft/Component.cpp b/launcher/minecraft/Component.cpp index 385688d4..c7dd5e36 100644 --- a/launcher/minecraft/Component.cpp +++ b/launcher/minecraft/Component.cpp @@ -1,14 +1,16 @@ #include <meta/VersionList.h> #include <meta/Index.h> -#include <Env.h> #include "Component.h" +#include <QSaveFile> + #include "meta/Version.h" #include "VersionFile.h" #include "minecraft/PackProfile.h" -#include <FileSystem.h> -#include <QSaveFile> +#include "FileSystem.h" #include "OneSixVersionFormat.h" +#include "Application.h" + #include <assert.h> Component::Component(PackProfile * parent, const QString& uid) @@ -85,9 +87,9 @@ std::shared_ptr<class VersionFile> Component::getVersionFile() const std::shared_ptr<class Meta::VersionList> Component::getVersionList() const { // FIXME: what if the metadata index isn't loaded yet? - if(ENV->metadataIndex()->hasUid(m_uid)) + if(APPLICATION->metadataIndex()->hasUid(m_uid)) { - return ENV->metadataIndex()->get(m_uid); + return APPLICATION->metadataIndex()->get(m_uid); } return nullptr; } @@ -192,7 +194,7 @@ bool Component::isRevertible() { if (isCustom()) { - if(ENV->metadataIndex()->hasUid(m_uid)) + if(APPLICATION->metadataIndex()->hasUid(m_uid)) { return true; } @@ -266,7 +268,7 @@ void Component::setVersion(const QString& version) // we don't have a file, therefore we are loaded with metadata m_cachedVersion = version; // see if the meta version is loaded - auto metaVersion = ENV->metadataIndex()->get(m_uid, version); + auto metaVersion = APPLICATION->metadataIndex()->get(m_uid, version); if(metaVersion->isLoaded()) { // if yes, we can continue with that. @@ -350,7 +352,7 @@ bool Component::revert() m_file.reset(); // check local cache for metadata... - auto version = ENV->metadataIndex()->get(m_uid, m_version); + auto version = APPLICATION->metadataIndex()->get(m_uid, m_version); if(version->isLoaded()) { m_metaVersion = version; |