diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-03-30 23:50:29 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-01 10:47:20 -0700 |
commit | 9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb (patch) | |
tree | 4daee3300ac1b7ad650e715395434d5277027bdf /launcher/tasks/ConcurrentTask.h | |
parent | f997529cd4fb077b06d05da9c6ff0c23b85b4ebb (diff) | |
download | PrismLauncher-9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb.tar.gz PrismLauncher-9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb.tar.bz2 PrismLauncher-9d2f0e4dc8fc3995052770c6a7948cb0372fdcbb.zip |
feat: Propogated subtask progress
Oh boy this is big.
> TaskStepProgress struct is now QMetaObject compatabile and can be sent through signals
> Task now has a method to propogates sub task progress it must be signal bound by each task containing a task wishing to report progress of it's children.
> Downloads report speed
> Tasks now have UUIDS to track them
- use when reporting
- use when logging
- use when storeing them or objects related to them
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/tasks/ConcurrentTask.h')
-rw-r--r-- | launcher/tasks/ConcurrentTask.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/launcher/tasks/ConcurrentTask.h b/launcher/tasks/ConcurrentTask.h index 93469766..9d4413c6 100644 --- a/launcher/tasks/ConcurrentTask.h +++ b/launcher/tasks/ConcurrentTask.h @@ -18,8 +18,8 @@ public: bool canAbort() const override { return true; } - inline auto isMultiStep() const -> bool override { return m_queue.size() > 1; }; - auto getStepProgress() const -> QList<TaskStepProgress> override; + inline auto isMultiStep() const -> bool override { return totalSize() > 1; }; + auto getStepProgress() const -> TaskStepProgressList override; void addTask(Task::Ptr task); @@ -41,7 +41,7 @@ slots: void subTaskFailed(Task::Ptr, const QString &msg); void subTaskStatus(Task::Ptr task, const QString &msg); void subTaskProgress(Task::Ptr task, qint64 current, qint64 total); - void subTaskStepProgress(Task::Ptr task, QList<TaskStepProgress> task_step_progress); + void subTaskStepProgress(Task::Ptr task, TaskStepProgressList task_step_progress); protected: // NOTE: This is not thread-safe. |