summaryrefslogtreecommitdiffhomepage
path: root/gui/process_detector.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-08 13:39:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-08 13:42:40 +0200
commit863b8cad6d95ed2492ac929066f843664a49998d (patch)
tree527a20e268234ac81b86d6e88506c3b847f5dc25 /gui/process_detector.cpp
parentced9bbd4c1b7d3a3968dbf8b1731bc49ff9f9164 (diff)
add complete(?) portable config support
Diffstat (limited to 'gui/process_detector.cpp')
-rw-r--r--gui/process_detector.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/gui/process_detector.cpp b/gui/process_detector.cpp
index e45c0215..b1ad541d 100644
--- a/gui/process_detector.cpp
+++ b/gui/process_detector.cpp
@@ -19,26 +19,30 @@
void settings::set_game_list(const QString &game_list)
{
- QSettings settings(OPENTRACK_ORG);
- settings.setValue("executable-list", game_list);
+ group::with_global_settings_object([&](QSettings& settings) {
+ settings.setValue("executable-list", game_list);
+ });
}
QString settings::get_game_list()
{
- QSettings settings(OPENTRACK_ORG);
- return settings.value("executable-list").toString();
+ return group::with_global_settings_object([&](QSettings& settings) {
+ return settings.value("executable-list").toString();
+ });
}
bool settings::is_enabled()
{
- QSettings settings(OPENTRACK_ORG);
- return settings.value("executable-detector-enabled", false).toBool();
+ return group::with_global_settings_object([&](QSettings& settings) {
+ return settings.value("executable-detector-enabled", false).toBool();
+ });
}
void settings::set_is_enabled(bool enabled)
{
- QSettings settings(OPENTRACK_ORG);
- settings.setValue("executable-detector-enabled", enabled);
+ group::with_global_settings_object([&](QSettings& settings) {
+ settings.setValue("executable-detector-enabled", enabled);
+ });
}
QHash<QString, QString> settings::split_process_names()