aboutsummaryrefslogtreecommitdiff
path: root/launcher/tasks/Task.h
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/tasks/Task.h')
-rw-r--r--launcher/tasks/Task.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/launcher/tasks/Task.h b/launcher/tasks/Task.h
index 7e1defd8..94b4089f 100644
--- a/launcher/tasks/Task.h
+++ b/launcher/tasks/Task.h
@@ -59,16 +59,18 @@ struct TaskStepProgress {
QString status = "";
QString details = "";
TaskStepState state = TaskStepState::Waiting;
+
TaskStepProgress() { this->uid = QUuid::createUuid(); }
- TaskStepProgress(QUuid uid) { this->uid = uid; }
+ TaskStepProgress(QUuid uid_) : uid(uid_) {}
+
bool isDone() const { return (state == TaskStepState::Failed) || (state == TaskStepState::Succeeded); }
- void update(qint64 current, qint64 total)
+ void update(qint64 new_current, qint64 new_total)
{
this->old_current = this->current;
this->old_total = this->total;
- this->current = current;
- this->total = total;
+ this->current = new_current;
+ this->total = new_total;
this->state = TaskStepState::Running;
}
};
@@ -150,7 +152,7 @@ class Task : public QObject, public QRunnable {
if (canAbort())
emitAborted();
return canAbort();
- };
+ }
void setAbortable(bool can_abort)
{