mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Task
- Added Eval sources.
This commit is contained in:
parent
79ac26cb02
commit
3a71fac1ee
1 changed files with 12 additions and 4 deletions
16
src/Task.cpp
16
src/Task.cpp
|
@ -24,7 +24,6 @@
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
//#include <iostream>
|
|
||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -56,10 +55,13 @@
|
||||||
#include <E9.h>
|
#include <E9.h>
|
||||||
#include <Eval.h>
|
#include <Eval.h>
|
||||||
#include <Variant.h>
|
#include <Variant.h>
|
||||||
|
#include <Filter.h>
|
||||||
|
#include <Dates.h>
|
||||||
|
|
||||||
#define APPROACHING_INFINITY 1000 // Close enough. This isn't rocket surgery.
|
#define APPROACHING_INFINITY 1000 // Close enough. This isn't rocket surgery.
|
||||||
|
|
||||||
extern Context context;
|
extern Context context;
|
||||||
|
extern Task& contextTask;
|
||||||
|
|
||||||
static const float epsilon = 0.000001;
|
static const float epsilon = 0.000001;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2225,7 +2227,9 @@ void Task::modify (modType type)
|
||||||
else if (column->type () == "date")
|
else if (column->type () == "date")
|
||||||
{
|
{
|
||||||
Eval e;
|
Eval e;
|
||||||
// TODO add sources.
|
e.addSource (domSource);
|
||||||
|
e.addSource (namedDates);
|
||||||
|
contextTask = *this;
|
||||||
|
|
||||||
Variant v;
|
Variant v;
|
||||||
e.evaluateInfixExpression (value, v);
|
e.evaluateInfixExpression (value, v);
|
||||||
|
@ -2244,7 +2248,9 @@ void Task::modify (modType type)
|
||||||
// TODO Store the raw value, for 'recur', else result.
|
// TODO Store the raw value, for 'recur', else result.
|
||||||
|
|
||||||
Eval e;
|
Eval e;
|
||||||
// TODO add sources.
|
e.addSource (domSource);
|
||||||
|
e.addSource (namedDates);
|
||||||
|
contextTask = *this;
|
||||||
|
|
||||||
Variant v;
|
Variant v;
|
||||||
e.evaluateInfixExpression (value, v);
|
e.evaluateInfixExpression (value, v);
|
||||||
|
@ -2257,7 +2263,9 @@ void Task::modify (modType type)
|
||||||
else if (column->type () == "numeric")
|
else if (column->type () == "numeric")
|
||||||
{
|
{
|
||||||
Eval e;
|
Eval e;
|
||||||
// TODO add sources.
|
e.addSource (domSource);
|
||||||
|
e.addSource (namedDates);
|
||||||
|
contextTask = *this;
|
||||||
|
|
||||||
Variant v;
|
Variant v;
|
||||||
e.evaluateInfixExpression (value, v);
|
e.evaluateInfixExpression (value, v);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue