NOISSUE allow killing the instance from main window

This commit is contained in:
Petr Mrázek
2016-11-26 18:06:08 +01:00
parent ce70407363
commit 66ffab71ae
9 changed files with 131 additions and 25 deletions

View File

@ -150,6 +150,26 @@ void LaunchTask::proceed()
m_steps[currentStep]->proceed();
}
bool LaunchTask::canAbort() const
{
switch(state)
{
case LaunchTask::Aborted:
case LaunchTask::Failed:
case LaunchTask::Finished:
return false;
case LaunchTask::NotStarted:
return true;
case LaunchTask::Running:
case LaunchTask::Waiting:
{
auto step = m_steps[currentStep];
return step->canAbort();
}
}
return false;
}
bool LaunchTask::abort()
{
switch(state)

View File

@ -80,7 +80,9 @@ public: /* methods */
/**
* @brief abort launch
*/
virtual bool abort() override;
bool abort() override;
bool canAbort() const override;
shared_qobject_ptr<LogModel> getLogModel();