task: massively simplified task system
Made various changes and fixes to the task system: - Tasks are built around QtConcurrent rather than QThread. Reduces code complexity significantly. - Task error reporting is now streamlined in both TaskManager and TaskDialog. - Moved ProjectImport/Save/LoadManager to the app/task folder
This commit is contained in:
@@ -61,8 +61,12 @@ TaskViewItem::TaskViewItem(Task* task, QWidget *parent) :
|
||||
|
||||
// Connect to the task
|
||||
connect(task_, &Task::ProgressChanged, progress_bar_, &QProgressBar::setValue);
|
||||
connect(task_, &Task::Removed, this, &TaskViewItem::deleteLater);
|
||||
connect(cancel_btn_, &QPushButton::clicked, task_, &Task::Cancel, Qt::DirectConnection);
|
||||
}
|
||||
|
||||
void TaskViewItem::Failed()
|
||||
{
|
||||
task_status_lbl_->setText(task_->GetError());
|
||||
}
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
Reference in New Issue
Block a user