mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-10-05 03:55:48 -04:00
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.
This commit is contained in:
1 parent
0e0ddf5494
commit
ce99fabe13
14 files changed
+102
-41
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user