diff options
Diffstat (limited to 'gui/process_detector.cpp')
-rw-r--r-- | gui/process_detector.cpp | 20 |
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() |