minor code cleanup

This commit is contained in:
itsmattkc
2019-07-06 21:17:19 -05:00
parent f32d1d2c85
commit a9ff2389e6
4 changed files with 14 additions and 19 deletions
+5 -18
View File
@@ -106,27 +106,14 @@ void TaskManager::DeleteTask(Task *t)
void TaskManager::TaskCallback(Task::Status status)
{
switch (status) {
case Task::kWaiting:
//qDebug() << sender() << "is waiting...";
break;
case Task::kWorking:
//qDebug() << sender() << "is working...";
break;
case Task::kFinished:
//qDebug() << sender() << "finished successfully.";
if (status == Task::kFinished || status == Task::kError) {
// The Task has finished, we can start a new one
StartNextWaiting();
DeleteTask(static_cast<Task*>(sender()));
break;
case Task::kError:
//qDebug() << sender() << "failed:" << static_cast<Task*>(sender())->error();
// The Task has finished, we can start a new one
StartNextWaiting();
break;
if (status == Task::kFinished) {
// The Task was successful, remove this Task from the queue
DeleteTask(static_cast<Task*>(sender()));
}
}
}