task: improve threading

This commit is contained in:
itsmattkc
2022-11-07 10:42:41 -08:00
parent a6cafe59a5
commit 373717629e
5 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -72,9 +72,9 @@ TaskViewItem::TaskViewItem(Task* task, QWidget *parent) :
// Set up elapsed timer
status_stack_->setCurrentWidget(elapsed_timer_lbl_);
elapsed_timer_lbl_->Start(task_->GetStartTime());
// Connect to the task
connect(task_, &Task::Started, elapsed_timer_lbl_, qOverload<qint64>(&ElapsedCounterWidget::Start));
connect(task_, &Task::ProgressChanged, this, &TaskViewItem::UpdateProgress);
connect(cancel_btn_, &QPushButton::clicked, this, [this] { emit TaskCancelled(task_); });
}