summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/LegacyInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-23 16:07:47 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-23 16:07:47 +0200
commitce99fabe1396ed2956dc7ecb468760ef88f98765 (patch)
tree603f7c6f1a0f27805b21843ec3f829354ad0ff77 /logic/minecraft/LegacyInstance.cpp
parent0e0ddf5494ab4a264b0dc18c4b94809844300dc0 (diff)
downloadMultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar.gz
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar.lz
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.tar.xz
MultiMC-ce99fabe1396ed2956dc7ecb468760ef88f98765.zip
GH-992 Add a transaction/locking mechanism to settings objects
This can cut the FTB loading by ~66% - worth it, but not ideal. Real solution will have to be implemented later.
Diffstat (limited to 'logic/minecraft/LegacyInstance.cpp')
-rw-r--r--logic/minecraft/LegacyInstance.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/logic/minecraft/LegacyInstance.cpp b/logic/minecraft/LegacyInstance.cpp
index 282504b3..387975fa 100644
--- a/logic/minecraft/LegacyInstance.cpp
+++ b/logic/minecraft/LegacyInstance.cpp
@@ -106,12 +106,12 @@ BaseProcess *LegacyInstance::prepareForLaunch(AuthSessionPtr account)
{
// window size
QString windowParams;
- if (settings().get("LaunchMaximized").toBool())
+ if (settings()->get("LaunchMaximized").toBool())
windowParams = "max";
else
windowParams = QString("%1x%2")
- .arg(settings().get("MinecraftWinWidth").toInt())
- .arg(settings().get("MinecraftWinHeight").toInt());
+ .arg(settings()->get("MinecraftWinWidth").toInt())
+ .arg(settings()->get("MinecraftWinHeight").toInt());
QString lwjgl = QDir(m_lwjglFolderSetting->get().toString() + "/" + lwjglVersion())
.absolutePath();
@@ -273,14 +273,14 @@ QString LegacyInstance::intendedVersionId() const
bool LegacyInstance::setIntendedVersionId(QString version)
{
- settings().set("IntendedJarVersion", version);
+ settings()->set("IntendedJarVersion", version);
setShouldUpdate(true);
return true;
}
bool LegacyInstance::shouldUpdate() const
{
- QVariant var = settings().get("ShouldUpdate");
+ QVariant var = settings()->get("ShouldUpdate");
if (!var.isValid() || var.toBool() == false)
{
return intendedVersionId() != currentVersionId();
@@ -290,7 +290,7 @@ bool LegacyInstance::shouldUpdate() const
void LegacyInstance::setShouldUpdate(bool val)
{
- settings().set("ShouldUpdate", val);
+ settings()->set("ShouldUpdate", val);
}
QString LegacyInstance::defaultBaseJar() const