aboutsummaryrefslogtreecommitdiff
path: root/launcher/tasks/Task.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-17 14:23:37 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-17 14:23:37 +0300
commit4a1d85f99913d0bacf8cdd118c81401378c758b6 (patch)
treee8389ba64e1b1a303545f1dad242c9a9124ddca9 /launcher/tasks/Task.h
parent939a2d67ed75be714e9f3b1b918250d006b3860a (diff)
parent85f36ebed7e1295547cd2324d1baf7834be89c31 (diff)
downloadPrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.tar.gz
PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.tar.bz2
PrismLauncher-4a1d85f99913d0bacf8cdd118c81401378c758b6.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
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)
{