TW-1806: project:ide is not allowed

- Thanks to Slaven ʙanovic.
This commit is contained in:
Paul Beckingham 2016-05-20 11:13:46 -05:00
parent 0683e14777
commit bac71c7670
13 changed files with 36 additions and 9 deletions

View file

@ -124,15 +124,30 @@ void ColumnProject::modify (Task& task, const std::string& value)
if (lexer.token (domRef, type) &&
type == Lexer::Type::dom)
{
Eval e;
e.addSource (domSource);
e.addSource (namedDates);
contextTask = task;
try
{
Eval e;
e.addSource (domSource);
e.addSource (namedDates);
contextTask = task;
Variant v;
e.evaluateInfixExpression (value, v);
task.set (_name, (std::string) v);
context.debug (label + _name + " <-- '" + (std::string) v + "' <-- '" + value + "'");
Variant v;
e.evaluateInfixExpression (value, v);
task.set (_name, (std::string) v);
context.debug (label + _name + " <-- '" + (std::string) v + "' <-- '" + value + "'");
}
catch (const std::string& e)
{
// If the expression failed because it didn't look like an expression,
// simply store it as-is.
if (e == STRING_EVAL_NOT_EXPRESSION)
{
task.set (_name, value);
context.debug (label + _name + " <-- '" + value + "'");
}
else
throw;
}
}
else
{