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
Task-Nr: QTCREATORBUG-4801
Reviewed-on: http://codereview.qt.nokia.com/419

Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent f38b0e7b
......@@ -88,7 +88,7 @@ void ProgressView::removeOldTasks(const QString &type, bool keepOne)
while (i != m_taskList.begin()) {
--i;
if ((*i)->type() == type) {
if (firstFound && (*i)->future().isFinished()) {
if (firstFound && ((*i)->future().isFinished() || (*i)->future().isCanceled())) {
deleteTask(*i);
i = m_taskList.erase(i);
}
......
Markdown is supported
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