Refactoring

- Obsoleted Cmd object.
- Removed Context::dispatch, renamed dispatch2 --> dispatch.
- Commented out import and custom report functionality that depends
  on Cmd.  This should be about as broken as taskwarrior gets.  It's
  all uphill from here.
This commit is contained in:
Paul Beckingham 2011-06-02 00:17:16 -04:00
parent bcbff8d99b
commit a3912d9123
10 changed files with 62 additions and 323 deletions

View file

@ -693,15 +693,16 @@ std::string CmdImport::taskCmdLine (const std::vector <std::string>& lines)
try
{
/*
context.args.clear ();
split (context.args, std::string ("add ") + line, ' ');
context.task.clear ();
context.cmd.command = "";
context.parse ();
// (void)handleAdd (unused);
context.commands["add"]->execute (unused, unused);
context.clearMessages ();
*/
}
catch (...)
@ -801,10 +802,12 @@ std::string CmdImport::todoSh_2_0 (const std::vector <std::string>& lines)
}
}
/*
context.task.clear ();
context.cmd.command = "";
context.parse ();
decorateTask (context.task);
*/
// Override the Task::pending that decorateTask applies.
if (!isPending)
@ -882,10 +885,12 @@ std::string CmdImport::text (const std::vector <std::string>& lines)
context.args.clear ();
split (context.args, std::string ("add ") + line, ' ');
/*
context.task.clear ();
context.cmd.command = "";
context.parse ();
decorateTask (context.task);
*/
context.tdb.add (context.task);
context.clearMessages ();