Skip to content

fix(ui): do not keep progress dialog shared pointers

Didier WECKMANN requested to merge do-not-keep-progress-dialog into dev

Description

When calling several times, code that uses a job which is used in a job_bar, it may happen that the associated progress bar is shown "stacked" with the previous one, instead of closing them as soon as the job is finished. This should fix this behavior.

job_bar keep progress-dialog shared_ptr in a set to keep them alive. That's fine, but because we also use a shared pointer to pass arguments to lambdas, the progress_dialog is also kept alive along the job itself, making them immortal until the underlying job is not destroyed.

The result is that the associated progress bar will be displayed, even if job::finish() has been called, which normally removes the progress-dialog shared_ptr from the job_bar set.

Results

The progress bar should disappear as soon as the job is finished.

How to test it?

Use an application that make use of a progress bar and reuse the same job

Edited by Didier WECKMANN

Merge request reports