Task: Project attributes are exempt from DOM expansion
This commit is contained in:
12
src/Task.cpp
12
src/Task.cpp
@@ -2003,8 +2003,11 @@ void Task::modify (modType type, bool text_required /* = false */)
|
|||||||
! column->modifiable ())
|
! column->modifiable ())
|
||||||
throw format (STRING_INVALID_MOD, name, value);
|
throw format (STRING_INVALID_MOD, name, value);
|
||||||
|
|
||||||
// Try to evaluate 'value'. It might work.
|
// String type attributes only get DOM resolution, no eval.
|
||||||
Variant evaluatedValue;
|
Variant evaluatedValue;
|
||||||
|
if (name != "project" || Lexer::isDOM (value))
|
||||||
|
{
|
||||||
|
// Try to evaluate 'value'. It might work.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Eval e;
|
Eval e;
|
||||||
@@ -2019,6 +2022,11 @@ void Task::modify (modType type, bool text_required /* = false */)
|
|||||||
{
|
{
|
||||||
evaluatedValue = Variant (value);
|
evaluatedValue = Variant (value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
evaluatedValue = Variant (value);
|
||||||
|
}
|
||||||
|
|
||||||
// Dependencies are specified as IDs.
|
// Dependencies are specified as IDs.
|
||||||
if (name == "depends")
|
if (name == "depends")
|
||||||
@@ -2160,7 +2168,7 @@ void Task::modify (modType type, bool text_required /* = false */)
|
|||||||
++modCount;
|
++modCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
// String type columns are not eval'd.
|
// String type columns are not eval'd. Welll, not much.
|
||||||
else if (column->type () == "string")
|
else if (column->type () == "string")
|
||||||
{
|
{
|
||||||
std::string strValue = (std::string) evaluatedValue;
|
std::string strValue = (std::string) evaluatedValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user