Commit 57d1598d authored by dt_'s avatar dt_ Committed by Daniel Teske
Browse files

ProgressView: Also replace old tasks that are canceling

Those tasks might not have finished yet, so there's a small race when
canceling and restarting a task.

Change-Id: I9f9ffcc6869455e7d8a407ff6ff4c40518d60f27

Reviewed-by: default avatarDaniel Teske <>
parent f38b0e7b
......@@ -88,7 +88,7 @@ void ProgressView::removeOldTasks(const QString &type, bool keepOne)
while (i != m_taskList.begin()) {
if ((*i)->type() == type) {
if (firstFound && (*i)->future().isFinished()) {
if (firstFound && ((*i)->future().isFinished() || (*i)->future().isCanceled())) {
i = m_taskList.erase(i);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment