diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/src/processrunner.cpp | 30 | ||||
| -rw-r--r-- | src/src/settings.cpp | 10 | ||||
| -rw-r--r-- | src/src/settings.h | 5 | ||||
| -rw-r--r-- | src/src/settingsdialog.ui | 17 | ||||
| -rw-r--r-- | src/src/settingsdialogworkarounds.cpp | 2 |
5 files changed, 4 insertions, 60 deletions
diff --git a/src/src/processrunner.cpp b/src/src/processrunner.cpp index 91176fd..63ecf83 100644 --- a/src/src/processrunner.cpp +++ b/src/src/processrunner.cpp @@ -1265,16 +1265,10 @@ ProcessRunner::Results ProcessRunner::postRun() m_lockReason = UILocker::LockUI; } - const bool lockEnabled = m_core.settings().interface().lockGUI(); const QStringList expectedExecutables = buildExpectedExecutables(m_sp.binary, m_sp.arguments); - if (mustWait) { - if (!lockEnabled) { - log::debug("locking is disabled, but the output of the application is required; " - "overriding this setting and locking the ui"); - } - } else { + if (!mustWait) { if (m_lockReason == UILocker::NoReason) { // Main window launches typically use TriggerRefresh without // waiting/locking. In that mode we still need post-run refresh/sync once @@ -1327,28 +1321,12 @@ ProcessRunner::Results ProcessRunner::postRun() } return Running; } - - if (!lockEnabled) { - log::debug("process runner: not waiting for process because " - "locking is disabled"); - - return ForceUnlocked; - } } auto r = Error; - - if (mustWait && m_lockReason == UILocker::PreventExit && !lockEnabled) { - // This happens when running shortcuts and locking is disabled. MO must - // stay alive until all processes are dead or child processes may not get - // hooked properly, but the user has disabled locking the ui — so allow - // them to do that. MO runs in the background with no visual feedback. - r = waitForProcess(m_handle.get(), &m_exitCode, nullptr, expectedExecutables); - } else { - withLock([&](auto& ls) { - r = waitForProcess(m_handle.get(), &m_exitCode, &ls, expectedExecutables); - }); - } + withLock([&](auto& ls) { + r = waitForProcess(m_handle.get(), &m_exitCode, &ls, expectedExecutables); + }); if (shouldRefresh(r)) { QEventLoop loop; diff --git a/src/src/settings.cpp b/src/src/settings.cpp index 2b408c0..c665756 100644 --- a/src/src/settings.cpp +++ b/src/src/settings.cpp @@ -2171,16 +2171,6 @@ void SteamSettings::setLogin(QString username, QString password) InterfaceSettings::InterfaceSettings(QSettings& settings) : m_Settings(settings) {} -bool InterfaceSettings::lockGUI() const -{ - return get<bool>(m_Settings, "Settings", "lock_gui", true); -} - -void InterfaceSettings::setLockGUI(bool b) -{ - set(m_Settings, "Settings", "lock_gui", b); -} - std::optional<QString> InterfaceSettings::styleName() const { return getOptional<QString>(m_Settings, "Settings", "style"); diff --git a/src/src/settings.h b/src/src/settings.h index 97b671d..6726b2f 100644 --- a/src/src/settings.h +++ b/src/src/settings.h @@ -584,11 +584,6 @@ class InterfaceSettings public: InterfaceSettings(QSettings& settings); - // whether the GUI should be locked when running executables - // - bool lockGUI() const; - void setLockGUI(bool b); - // filename of the theme // std::optional<QString> styleName() const; diff --git a/src/src/settingsdialog.ui b/src/src/settingsdialog.ui index 73ca890..04dcd3e 100644 --- a/src/src/settingsdialog.ui +++ b/src/src/settingsdialog.ui @@ -1993,22 +1993,6 @@ Uncheck this if you want to use Mod Organizer with total conversions (like Nehri </property> </widget> </item> - <item> - <widget class="QCheckBox" name="lockGUIBox"> - <property name="toolTip"> - <string>Disable this to prevent the GUI from being locked when running an executable. This may result in abnormal behavior.</string> - </property> - <property name="whatsThis"> - <string>Disable this to prevent the GUI from being locked when running an executable. This may result in abnormal behavior.</string> - </property> - <property name="text"> - <string>Lock GUI when running executable</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> </layout> </widget> </item> @@ -2513,7 +2497,6 @@ programs you are intentionally running.</string> <tabstop>managedGameDirEdit</tabstop> <tabstop>browseGameDirBtn</tabstop> <tabstop>pluginSettingsList</tabstop> - <tabstop>lockGUIBox</tabstop> </tabstops> <resources> <include location="resources.qrc"/> diff --git a/src/src/settingsdialogworkarounds.cpp b/src/src/settingsdialogworkarounds.cpp index 820e697..2b252b3 100644 --- a/src/src/settingsdialogworkarounds.cpp +++ b/src/src/settingsdialogworkarounds.cpp @@ -11,7 +11,6 @@ WorkaroundsSettingsTab::WorkaroundsSettingsTab(Settings& s, SettingsDialog& d) { // options ui->forceEnableBox->setChecked(settings().game().forceEnableCoreFiles()); - ui->lockGUIBox->setChecked(settings().interface().lockGUI()); ui->enableArchiveParsingBox->setChecked(settings().archiveParsing()); // steam @@ -59,7 +58,6 @@ void WorkaroundsSettingsTab::update() { // options settings().game().setForceEnableCoreFiles(ui->forceEnableBox->isChecked()); - settings().interface().setLockGUI(ui->lockGUIBox->isChecked()); settings().setArchiveParsing(ui->enableArchiveParsingBox->isChecked()); // steam |
