summaryrefslogtreecommitdiffhomepage
path: root/migration/20180102_00-process-detector-separator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'migration/20180102_00-process-detector-separator.cpp')
-rw-r--r--migration/20180102_00-process-detector-separator.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/migration/20180102_00-process-detector-separator.cpp b/migration/20180102_00-process-detector-separator.cpp
index ddb01cb4..3656bf73 100644
--- a/migration/20180102_00-process-detector-separator.cpp
+++ b/migration/20180102_00-process-detector-separator.cpp
@@ -2,6 +2,7 @@
#include "options/options.hpp"
using namespace options;
+using namespace options::globals;
using namespace migrations;
static constexpr auto OLD_RECORD_SEPARATOR = QChar('|');
@@ -26,7 +27,7 @@ struct process_detector_record_separator : migration
bool should_run() const override
{
- return group::with_global_settings_object([](const QSettings& s)
+ return with_global_settings_object([](const QSettings& s)
{
const QString old_value = s.value(KEY_NAME).toString();
return old_value.contains(OLD_RECORD_SEPARATOR);
@@ -35,14 +36,15 @@ struct process_detector_record_separator : migration
void run() override
{
- return group::with_global_settings_object([](QSettings& s)
+ return with_global_settings_object([](QSettings& s)
{
QString value = s.value(KEY_NAME).toString();
value.replace(OLD_UNIT_SEPARATOR, NEW_UNIT_SEPARATOR);
value.replace(OLD_RECORD_SEPARATOR, NEW_RECORD_SEPARATOR);
s.setValue(KEY_NAME, value);
+ mark_global_ini_modified();
});
}
};
-OPENTRACK_MIGRATION(process_detector_record_separator);
+OPENTRACK_MIGRATION(process_detector_record_separator)