CmdCount
- Converted from Command::filter to Filter::subset.
This commit is contained in:
@@ -530,7 +530,7 @@ const std::string A3t::getFilterExpression ()
|
|||||||
if ((*i)->hasTag ("FILTER") && ! (*i)->hasTag ("PSEUDO"))
|
if ((*i)->hasTag ("FILTER") && ! (*i)->hasTag ("PSEUDO"))
|
||||||
{
|
{
|
||||||
// Two consecutive FILTER, non-OP arguments that are not "(" or ")" need
|
// Two consecutive FILTER, non-OP arguments that are not "(" or ")" need
|
||||||
// an "AND" operator inserted between them.
|
// an "and" operator inserted between them.
|
||||||
//
|
//
|
||||||
// ) <non-op> --> ) and <non-op>
|
// ) <non-op> --> ) and <non-op>
|
||||||
// <non-op> ( --> <non-op> <and> (
|
// <non-op> ( --> <non-op> <and> (
|
||||||
@@ -541,7 +541,7 @@ const std::string A3t::getFilterExpression ()
|
|||||||
(((*prev)->hasTag ("FILTER") && ! (*prev)->hasTag ("OP")) || (*prev)->attribute ("raw") == ")") &&
|
(((*prev)->hasTag ("FILTER") && ! (*prev)->hasTag ("OP")) || (*prev)->attribute ("raw") == ")") &&
|
||||||
(! (*i)->hasTag ("OP") || (*i)->attribute ("raw") == "("))
|
(! (*i)->hasTag ("OP") || (*i)->attribute ("raw") == "("))
|
||||||
{
|
{
|
||||||
filter += " AND";
|
filter += " and";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*i)->hasTag ("ID"))
|
if ((*i)->hasTag ("ID"))
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ int main (int argc, const char** argv)
|
|||||||
a3t.entity ("report", "unblocked");
|
a3t.entity ("report", "unblocked");
|
||||||
a3t.entity ("report", "waiting");
|
a3t.entity ("report", "waiting");
|
||||||
|
|
||||||
|
|
||||||
// Read-only commands.
|
// Read-only commands.
|
||||||
a3t.entity ("readcmd", "export");
|
a3t.entity ("readcmd", "export");
|
||||||
a3t.entity ("readcmd", "info");
|
a3t.entity ("readcmd", "info");
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
|
#include <Filter.h>
|
||||||
#include <main.h>
|
#include <main.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
@@ -49,7 +50,8 @@ int CmdCount::execute (std::string& output)
|
|||||||
// Apply filter.
|
// Apply filter.
|
||||||
handleRecurrence ();
|
handleRecurrence ();
|
||||||
std::vector <Task> filtered;
|
std::vector <Task> filtered;
|
||||||
filter (filtered);
|
Filter filter;
|
||||||
|
filter.subset (filtered);
|
||||||
context.tdb2.commit ();
|
context.tdb2.commit ();
|
||||||
|
|
||||||
// Find number of matching tasks. Skip recurring parent tasks.
|
// Find number of matching tasks. Skip recurring parent tasks.
|
||||||
|
|||||||
Reference in New Issue
Block a user