Filter: Implemnted ::hasFilter to detect command line filters
This commit is contained in:
@@ -198,6 +198,16 @@ void Filter::subset (std::vector <Task>& output, bool applyContext /* = true */)
|
|||||||
context.timer_filter.stop ();
|
context.timer_filter.stop ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool Filter::hasFilter ()
|
||||||
|
{
|
||||||
|
for (auto& a : context.cli2._args)
|
||||||
|
if (a.hasTag ("FILTER"))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Filter::hasModifications ()
|
bool Filter::hasModifications ()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public:
|
|||||||
|
|
||||||
void subset (const std::vector <Task>&, std::vector <Task>&, bool applyContext = true);
|
void subset (const std::vector <Task>&, std::vector <Task>&, bool applyContext = true);
|
||||||
void subset (std::vector <Task>&, bool applyContext = true);
|
void subset (std::vector <Task>&, bool applyContext = true);
|
||||||
|
bool hasFilter ();
|
||||||
bool hasModifications ();
|
bool hasModifications ();
|
||||||
bool pendingOnly ();
|
bool pendingOnly ();
|
||||||
void safety ();
|
void safety ();
|
||||||
|
|||||||
Reference in New Issue
Block a user