diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-02 09:35:11 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-02 09:35:11 -0400 |
| commit | ca2a7da3f6534515160d5fbf92f72d6ff2bce3e8 (patch) | |
| tree | 6712f1bbd292c668731d95ef5f24612b09c694ed /src/settings.cpp | |
| parent | a174d4a2aa3d07c6a3c4bedfdf77471f71ec1dba (diff) | |
moved workarounds to settings
Diffstat (limited to 'src/settings.cpp')
| -rw-r--r-- | src/settings.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 072318a2..f6be8ba0 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -421,16 +421,31 @@ bool Settings::hideUncheckedPlugins() const return m_Settings.value("Settings/hide_unchecked_plugins", false).toBool(); } +void Settings::setHideUncheckedPlugins(bool b) +{ + m_Settings.setValue("Settings/hide_unchecked_plugins", b); +} + bool Settings::forceEnableCoreFiles() const { return m_Settings.value("Settings/force_enable_core_files", true).toBool(); } +void Settings::setForceEnableCoreFiles(bool b) +{ + m_Settings.setValue("Settings/force_enable_core_files", b); +} + bool Settings::lockGUI() const { return m_Settings.value("Settings/lock_gui", true).toBool(); } +void Settings::setLockGUI(bool b) +{ + m_Settings.setValue("Settings/lock_gui", b); +} + bool Settings::automaticLoginEnabled() const { return m_Settings.value("Settings/nexus_login", false).toBool(); @@ -441,6 +456,15 @@ QString Settings::getSteamAppID() const return m_Settings.value("Settings/app_id", m_GamePlugin->steamAPPId()).toString(); } +void Settings::setSteamAppID(const QString& id) +{ + if (id.isEmpty()) { + m_Settings.remove("Settings/app_id"); + } else { + m_Settings.setValue("Settings/app_id", id); + } +} + bool Settings::usePrereleases() const { return m_Settings.value("Settings/use_prereleases", false).toBool(); @@ -782,6 +806,11 @@ QString Settings::executablesBlacklist() const ).toString(); } +void Settings::setExecutablesBlacklist(const QString& s) +{ + m_Settings.setValue("Settings/executable_blacklist", s); +} + void Settings::setSteamLogin(QString username, QString password) { if (username == "") { @@ -815,6 +844,10 @@ LoadMechanism::EMechanism Settings::getLoadMechanism() const } } +void Settings::setLoadMechanism(LoadMechanism::EMechanism m) +{ + m_Settings.setValue("Settings/load_mechanism", static_cast<int>(m)); +} void Settings::setupLoadMechanism() { @@ -869,6 +902,11 @@ bool Settings::displayForeign() const return m_Settings.value("Settings/display_foreign", true).toBool(); } +void Settings::setDisplayForeign(bool b) +{ + m_Settings.setValue("Settings/display_foreign", b); +} + void Settings::setMotDHash(uint hash) { m_Settings.setValue("motd_hash", hash); @@ -884,6 +922,11 @@ bool Settings::archiveParsing() const return m_Settings.value("Settings/archive_parsing_experimental", false).toBool(); } +void Settings::setArchiveParsing(bool b) +{ + m_Settings.setValue("Settings/archive_parsing_experimental", b); +} + QString Settings::language() { QString result = m_Settings.value("Settings/language", "").toString(); |
