refactor(Tasks): remove 'm_total_size' from ConcurrentTask

We can use the queues directly instead.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-12-17 12:55:03 -03:00
parent c440f33122
commit 81fedbf03c
5 changed files with 12 additions and 15 deletions

View File

@ -41,6 +41,9 @@ slots:
void subTaskProgress(qint64 current, qint64 total);
protected:
// NOTE: This is not thread-safe.
[[nodiscard]] unsigned int totalSize() const { return m_queue.size() + m_doing.size() + m_done.size(); }
void setStepStatus(QString status) { m_step_status = status; emit stepStatus(status); };
virtual void updateState();
@ -56,7 +59,6 @@ protected:
QHash<Task*, Task::Ptr> m_failed;
int m_total_max_size;
int m_total_size;
qint64 m_stepProgress = 0;
qint64 m_stepTotalProgress = 100;