chore: clean up after new compiler warnings
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
@ -53,7 +53,7 @@ class ConcurrentTask : public Task {
|
||||
|
||||
bool canAbort() const override { return true; }
|
||||
|
||||
inline auto isMultiStep() const -> bool override { return totalSize() > 1; };
|
||||
inline auto isMultiStep() const -> bool override { return totalSize() > 1; }
|
||||
auto getStepProgress() const -> TaskStepProgressList override;
|
||||
|
||||
void addTask(Task::Ptr task);
|
||||
@ -80,7 +80,7 @@ class ConcurrentTask : public Task {
|
||||
|
||||
protected:
|
||||
// NOTE: This is not thread-safe.
|
||||
[[nodiscard]] unsigned int totalSize() const { return m_queue.size() + m_doing.size() + m_done.size(); }
|
||||
[[nodiscard]] unsigned int totalSize() const { return static_cast<unsigned int>(m_queue.size() + m_doing.size() + m_done.size()); }
|
||||
|
||||
enum class Operation { ADDED, REMOVED, CHANGED };
|
||||
void updateStepProgress(TaskStepProgress const& changed_progress, Operation);
|
||||
|
@ -71,12 +71,12 @@ struct TaskStepProgress {
|
||||
this->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;
|
||||
}
|
||||
};
|
||||
@ -155,7 +155,7 @@ class Task : public QObject, public QRunnable {
|
||||
void run() override { start(); }
|
||||
|
||||
virtual void start();
|
||||
virtual bool abort() { if(canAbort()) emitAborted(); return canAbort(); };
|
||||
virtual bool abort() { if(canAbort()) emitAborted(); return canAbort(); }
|
||||
|
||||
void setAbortable(bool can_abort) { m_can_abort = can_abort; emit abortStatusChanged(can_abort); }
|
||||
|
||||
|
Reference in New Issue
Block a user