From ce99fabe1396ed2956dc7ecb468760ef88f98765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 23 May 2015 16:07:47 +0200 Subject: 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. --- application/ConsoleWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'application/ConsoleWindow.cpp') diff --git a/application/ConsoleWindow.cpp b/application/ConsoleWindow.cpp index 52c68299..a96d84a1 100644 --- a/application/ConsoleWindow.cpp +++ b/application/ConsoleWindow.cpp @@ -138,7 +138,7 @@ ConsoleWindow::ConsoleWindow(BaseProcess *process, QWidget *parent) setMayClose(false); - if (m_proc->instance()->settings().get("ShowConsole").toBool()) + if (m_proc->instance()->settings()->get("ShowConsole").toBool()) { show(); } @@ -225,7 +225,7 @@ void ConsoleWindow::onEnded(InstancePtr instance, int code, QProcess::ExitStatus bool peacefulExit = code == 0 && status != QProcess::CrashExit; m_killButton->setEnabled(false); setMayClose(true); - if (instance->settings().get("AutoCloseConsole").toBool()) + if (instance->settings()->get("AutoCloseConsole").toBool()) { if (peacefulExit) { -- cgit v1.2.3