Remove references to the 'depends' property outside of Task.cpp

With the exception of `taskDifferences` and `taskInfoDifferences`,
deferred to #2572.
This commit is contained in:
Dustin J. Mitchell
2021-08-15 17:18:47 +00:00
committed by Tomas Babej
parent 9e67f4f946
commit 413b8d22b7
11 changed files with 92 additions and 92 deletions

View File

@@ -667,7 +667,8 @@ void CmdEdit::parseTask (Task& task, const std::string& after, const std::string
value = findValue (after, "\n Dependencies:");
auto dependencies = split (value, ',');
task.remove ("depends");
for (auto& dep : task.getDependencyUUIDs ())
task.removeDependency (dep);
for (auto& dep : dependencies)
{
if (dep.length () >= 7)

View File

@@ -147,7 +147,7 @@ int CmdInfo::execute (std::string& output)
// dependencies: blocked
{
auto blocked = dependencyGetBlocking (task);
auto blocked = task.getDependencyTasks ();
if (blocked.size ())
{
std::stringstream message;
@@ -162,7 +162,7 @@ int CmdInfo::execute (std::string& output)
// dependencies: blocking
{
auto blocking = dependencyGetBlocked (task);
auto blocking = task.getBlockedTasks ();
if (blocking.size ())
{
std::stringstream message;

View File

@@ -71,8 +71,7 @@ void CmdPurge::handleDeps (Task& task)
for (auto& blockedConst: Context::getContext ().tdb2.all_tasks ())
{
Task& blocked = const_cast<Task&>(blockedConst);
if (blocked.has ("depends") &&
blocked.get ("depends").find (uuid) != std::string::npos)
if (blocked.hasDependency (uuid))
{
blocked.removeDependency (uuid);
Context::getContext ().tdb2.modify (blocked);