- Modified ::onExit to remove the indicator that data was modified. This is not
  supported.
This commit is contained in:
Paul Beckingham 2014-09-07 22:56:28 -04:00
parent a9cf61c1d1
commit 5ce317bb48
3 changed files with 3 additions and 8 deletions

View file

@ -284,8 +284,7 @@ int Context::run ()
try try
{ {
rc = dispatch (output); rc = dispatch (output);
if (hooks.onExit ()) hooks.onExit ();
tdb2.commit ();
std::stringstream s; std::stringstream s;
s << "Perf " s << "Perf "

View file

@ -136,13 +136,10 @@ void Hooks::onLaunch ()
// Exit: // Exit:
// 0 Means: - all emitted non-JSON lines become footnote entries // 0 Means: - all emitted non-JSON lines become footnote entries
// non-0 Means: - all emitted non-JSON lines become error entries // non-0 Means: - all emitted non-JSON lines become error entries
bool Hooks::onExit () void Hooks::onExit ()
{ {
context.timer_hooks.start (); context.timer_hooks.start ();
// Status indicates whether hooks resulted in new/modified tasks.
bool status = false;
std::vector <std::string> matchingScripts = scripts ("on-exit"); std::vector <std::string> matchingScripts = scripts ("on-exit");
std::vector <std::string>::iterator i; std::vector <std::string>::iterator i;
for (i = matchingScripts.begin (); i != matchingScripts.end (); ++i) for (i = matchingScripts.begin (); i != matchingScripts.end (); ++i)
@ -169,7 +166,6 @@ bool Hooks::onExit ()
} }
context.timer_hooks.stop (); context.timer_hooks.stop ();
return status;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View file

@ -41,7 +41,7 @@ public:
void initialize (); void initialize ();
void onLaunch (); void onLaunch ();
bool onExit (); void onExit ();
void onAdd (Task&); void onAdd (Task&);
void onModify (const Task&, Task&); void onModify (const Task&, Task&);