TDB2
- Converted _urgency command from tdb to tdb2.
This commit is contained in:
@@ -50,17 +50,9 @@ CmdUrgency::CmdUrgency ()
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdUrgency::execute (std::string& output)
|
int CmdUrgency::execute (std::string& output)
|
||||||
{
|
{
|
||||||
// Get all the tasks.
|
|
||||||
std::vector <Task> tasks;
|
|
||||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
|
||||||
handleRecurrence ();
|
|
||||||
context.tdb.loadPending (tasks);
|
|
||||||
context.tdb.commit ();
|
|
||||||
context.tdb.unlock ();
|
|
||||||
|
|
||||||
// Apply filter.
|
// Apply filter.
|
||||||
std::vector <Task> filtered;
|
std::vector <Task> filtered;
|
||||||
filter (tasks, filtered);
|
filter (filtered);
|
||||||
|
|
||||||
if (filtered.size () == 0)
|
if (filtered.size () == 0)
|
||||||
{
|
{
|
||||||
@@ -68,7 +60,7 @@ int CmdUrgency::execute (std::string& output)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the task(s).
|
// Display urgency for the selected tasks.
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
std::vector <Task>::iterator task;
|
std::vector <Task>::iterator task;
|
||||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||||
|
|||||||
Reference in New Issue
Block a user