diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-01-27 22:31:07 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-02 00:14:06 +0200 |
commit | 791221e923586bb717396ecf18bd13e57034df99 (patch) | |
tree | 9f608af07375b38626c8964671620477158341ba /logic/BaseInstance.cpp | |
parent | 593111b14463e9d5d08256061b981b5ab1cfb710 (diff) | |
download | MultiMC-791221e923586bb717396ecf18bd13e57034df99.tar MultiMC-791221e923586bb717396ecf18bd13e57034df99.tar.gz MultiMC-791221e923586bb717396ecf18bd13e57034df99.tar.lz MultiMC-791221e923586bb717396ecf18bd13e57034df99.tar.xz MultiMC-791221e923586bb717396ecf18bd13e57034df99.zip |
NOISSUE Refactors and moving of things
Diffstat (limited to 'logic/BaseInstance.cpp')
-rw-r--r-- | logic/BaseInstance.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp index 8048beea..a073a921 100644 --- a/logic/BaseInstance.cpp +++ b/logic/BaseInstance.cpp @@ -28,7 +28,6 @@ #include <cmdutils.h> #include "logic/minecraft/MinecraftVersionList.h" #include "logic/icons/IconList.h" -#include "logic/InstanceList.h" BaseInstance::BaseInstance(const QString &rootDir, SettingsObject *settings, QObject *parent) : QObject(parent) @@ -115,30 +114,9 @@ QString BaseInstance::instanceRoot() const return m_rootDir; } -QString BaseInstance::minecraftRoot() const -{ - QFileInfo mcDir(PathCombine(instanceRoot(), "minecraft")); - QFileInfo dotMCDir(PathCombine(instanceRoot(), ".minecraft")); - - if (dotMCDir.exists() && !mcDir.exists()) - return dotMCDir.filePath(); - else - return mcDir.filePath(); -} - -InstanceList *BaseInstance::instList() const -{ - return qobject_cast<InstanceList *>(parent()); -} - InstancePtr BaseInstance::getSharedPtr() { - return instList()->getInstanceById(id()); -} - -std::shared_ptr<BaseVersionList> BaseInstance::versionList() const -{ - return MMC->minecraftlist(); + return shared_from_this(); } SettingsObject &BaseInstance::settings() const |