From 6e56849bce5fd70cda001ebfaf30650ddcb6fc72 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 31 Jan 2016 19:28:23 -0500 Subject: [PATCH] Task: Migrated part of ::modify to ColRecur --- src/Task.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/Task.cpp b/src/Task.cpp index 2b7d9d0d5..a74119240 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1981,6 +1981,7 @@ void Task::modify (modType type, bool text_required /* = false */) ! column->modifiable ()) throw format (STRING_INVALID_MOD, name, value); + // TODO This eval section will go away soon... // DOM resolution. If it evals, store that, otherwise raw. Variant evaluatedValue; if (name != "project" || Lexer::isDOM (value)) @@ -2008,7 +2009,8 @@ void Task::modify (modType type, bool text_required /* = false */) // Dependencies are specified as IDs or UUIDs. if (name == "depends" || - name == "tags") + name == "tags" || + name == "recur") { column->modify (*this, value); mods = true; @@ -2040,24 +2042,6 @@ void Task::modify (modType type, bool text_required /* = false */) mods = true; } - // Special case: type duration. - // Note: "recur" is marked as type "string" to force storage in raw form. - else if (name == "recur") - { - // The duration is stored in raw form, but it must still be valid, - // and therefore is parsed first. - - if (evaluatedValue.type () == Variant::type_duration) - { - // Store the raw value, for 'recur'. - context.debug (label + name + " <-- '" + value + "'"); - set (name, value); - mods = true; - } - else - throw format (STRING_TASK_INVALID_DUR, value); - } - else if (column->type () == "duration") { // The duration is stored in raw form, but it must still be valid,