mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-10 04:00:37 +02:00
Code Cleanup
- Replaced multiple Task:setX methods with Task::setAsNow (x).
This commit is contained in:
parent
cf5dbbb9ee
commit
b5f3cfd9a3
6 changed files with 15 additions and 47 deletions
|
@ -87,7 +87,7 @@ int CmdDelete::execute (std::string& output)
|
|||
task->modify (Task::modAnnotate);
|
||||
task->setStatus (Task::deleted);
|
||||
if (! task->has ("end"))
|
||||
task->setEnd ();
|
||||
task->setAsNow ("end");
|
||||
|
||||
if (permission (*task, question, filtered.size ()))
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ int CmdDelete::execute (std::string& output)
|
|||
sibling->modify (Task::modAnnotate);
|
||||
sibling->setStatus (Task::deleted);
|
||||
if (! sibling->has ("end"))
|
||||
sibling->setEnd ();
|
||||
sibling->setAsNow ("end");
|
||||
|
||||
updateRecurrenceMask (*sibling);
|
||||
context.tdb2.modify (*sibling);
|
||||
|
@ -126,7 +126,7 @@ int CmdDelete::execute (std::string& output)
|
|||
context.tdb2.get (task->get ("parent"), parent);
|
||||
parent.setStatus (Task::deleted);
|
||||
if (! parent.has ("end"))
|
||||
parent.setEnd ();
|
||||
parent.setAsNow ("end");
|
||||
|
||||
context.tdb2.modify (parent);
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ int CmdDelete::execute (std::string& output)
|
|||
child->modify (Task::modAnnotate);
|
||||
child->setStatus (Task::deleted);
|
||||
if (! child->has ("end"))
|
||||
child->setEnd ();
|
||||
child->setAsNow ("end");
|
||||
|
||||
updateRecurrenceMask (*child);
|
||||
context.tdb2.modify (*child);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue