mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed obsolete A3::postfix, Task::modify, Task::next_mod_group, Command::modify_task*.
This commit is contained in:
parent
e7d733881a
commit
3abff20a46
6 changed files with 0 additions and 401 deletions
|
@ -278,66 +278,6 @@ bool Command::displays_id () const
|
|||
return _displays_id;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO Obsolete.
|
||||
// Apply the modifications in arguments to the task.
|
||||
void Command::modify_task_description_replace (Task& task, const A3& arguments)
|
||||
{
|
||||
std::string description;
|
||||
modify_task (task, arguments, description);
|
||||
|
||||
if (description.length ())
|
||||
{
|
||||
_needs_confirm = true;
|
||||
task.set ("description", description);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO Obsolete.
|
||||
void Command::modify_task_description_prepend (Task& task, const A3& arguments)
|
||||
{
|
||||
std::string description;
|
||||
modify_task (task, arguments, description);
|
||||
|
||||
if (description.length ())
|
||||
task.set ("description", description + " " + task.get ("description"));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO Obsolete.
|
||||
void Command::modify_task_description_append (Task& task, const A3& arguments)
|
||||
{
|
||||
std::string description;
|
||||
modify_task (task, arguments, description);
|
||||
|
||||
if (description.length ())
|
||||
task.set ("description", task.get ("description") + " " + description);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO Obsolete.
|
||||
void Command::modify_task_annotate (Task& task, const A3& arguments)
|
||||
{
|
||||
std::string description;
|
||||
modify_task (task, arguments, description);
|
||||
|
||||
if (description.length ())
|
||||
task.addAnnotation (description);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// TODO Obsolete.
|
||||
// Worker function that does all the updates, but never overwrites description.
|
||||
void Command::modify_task (
|
||||
Task& task,
|
||||
const A3& arguments,
|
||||
std::string& description)
|
||||
{
|
||||
// Utilize Task::modify
|
||||
task.modify (arguments, description);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Returns true or false indicating whether to proceed with a write command, on
|
||||
// a per-task basis, after (potentially) asking for permission.
|
||||
|
|
|
@ -52,12 +52,6 @@ public:
|
|||
virtual int execute (std::string&) = 0;
|
||||
|
||||
protected:
|
||||
void modify_task_description_replace (Task&, const A3&);
|
||||
void modify_task_description_prepend (Task&, const A3&);
|
||||
void modify_task_description_append (Task&, const A3&);
|
||||
void modify_task_annotate (Task&, const A3&);
|
||||
void modify_task (Task&, const A3&, std::string&);
|
||||
|
||||
bool permission (const Task&, const std::string&, unsigned int);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue