Defined new finished() signal in InsightWorkerTask

This commit is contained in:
Nav
2022-04-24 15:31:38 +01:00
parent 2f2fbfcd0f
commit e61d651a24
2 changed files with 22 additions and 1 deletions

View File

@@ -19,5 +19,7 @@ namespace Bloom
Logger::debug("InsightWorker task failed - " + std::string(exception.what()));
emit this->failed(QString::fromStdString(exception.what()));
}
emit this->finished();
}
}

View File

@@ -27,10 +27,29 @@ namespace Bloom
void execute(TargetController::TargetControllerConsole& targetControllerConsole);
signals:
/**
* The InsightWorkerTask::started() signal will be emitted once the task has started (InsightWorker::run() is
* called)
*/
void started();
void failed(QString errorMessage);
/**
* The InsightWorkerTask::completed() signal will be emitted once the task has successfully completed.
*/
void completed();
/**
* The InsightWorkerTask::failed() signal will be emitted when the task fails (InsightWorkerTask::run() throws
* an exception).
*/
void failed(QString errorMessage);
/**
* The InsightWorkerTask::finished() signal will be emitted at the end of the task, regardless to whether it
* completed successfully or failed.
*/
void finished();
protected:
virtual void run(TargetController::TargetControllerConsole& targetControllerConsole) = 0;
};