summaryrefslogtreecommitdiffstats
path: root/logic/BaseInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-01-27 22:31:07 +0100
committerPetr Mrázek <peterix@gmail.com>2015-04-02 00:14:06 +0200
commit791221e923586bb717396ecf18bd13e57034df99 (patch)
tree9f608af07375b38626c8964671620477158341ba /logic/BaseInstance.cpp
parent593111b14463e9d5d08256061b981b5ab1cfb710 (diff)
downloadMultiMC-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.cpp24
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