- Converted from A3 to Filter.
This commit is contained in:
Paul Beckingham 2014-05-12 00:18:22 -04:00
parent 468e02c73b
commit 8a92c36916

View file

@ -32,6 +32,7 @@
#include <unistd.h>
#include <OldDuration.h>
#include <Context.h>
#include <Filter.h>
#include <i18n.h>
#include <text.h>
#include <util.h>
@ -57,21 +58,20 @@ CmdEdit::CmdEdit ()
// wrench. To be used sparingly.
int CmdEdit::execute (std::string& output)
{
int rc = 0;
// Filter the tasks.
handleRecurrence ();
Filter filter;
std::vector <Task> filtered;
filter (filtered);
filter.subset (filtered);
// Find number of matching tasks. Skip recurring parent tasks.
// Find number of matching tasks.
std::vector <Task>::iterator task;
for (task = filtered.begin (); task != filtered.end (); ++task)
if (editFile (*task))
context.tdb2.modify (*task);
context.tdb2.commit ();
return rc;
return 0;
}
////////////////////////////////////////////////////////////////////////////////