fix: memory leak with NetJob and responce not getting cleaned up

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-05-21 01:46:28 -07:00
parent d5c6a1b4d1
commit 1b3ff96ffd
8 changed files with 140 additions and 79 deletions

View File

@ -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)