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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/launcher/tasks/Task.h b/launcher/tasks/Task.h
index 799ed945..6d8bbbb4 100644
--- a/launcher/tasks/Task.h
+++ b/launcher/tasks/Task.h
@@ -64,7 +64,21 @@ struct TaskStepProgress {
QString status = "";
QString details = "";
TaskStepState state = TaskStepState::Waiting;
+ TaskStepProgress() {
+ this->uid = QUuid::createUuid();
+ }
+ TaskStepProgress(QUuid uid) {
+ this->uid = uid;
+ }
bool isDone() const { return (state == TaskStepState::Failed) || (state == TaskStepState::Succeeded); }
+ void update(qint64 current, qint64 total) {
+ this->old_current = this->current;
+ this->old_total = this->total;
+
+ this->current = current;
+ this->total = total;
+ this->state = TaskStepState::Running;
+ }
};
Q_DECLARE_METATYPE(TaskStepProgress)