Skip to content
Snippets Groups Projects
Commit 0981b1c7 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Report finished state for concurrent jobs that don't support progress

Some concurrent jobs, like getting 'git blame' output, do not report
progress. Their the minimum and maximum of their progress range is
always 0, but they do report when they are finished. When such a job
finishes, we should make sure the progress bar indicates this.

Reviewed-by: con
parent c6dfc92d
No related branches found
No related tags found
No related merge requests found
...@@ -197,6 +197,13 @@ bool FutureProgress::eventFilter(QObject *, QEvent *e) ...@@ -197,6 +197,13 @@ bool FutureProgress::eventFilter(QObject *, QEvent *e)
void FutureProgress::setFinished() void FutureProgress::setFinished()
{ {
updateToolTip(m_watcher.future().progressText()); updateToolTip(m_watcher.future().progressText());
// Special case for concurrent jobs that don't use QFutureInterface to report progress
if (m_watcher.progressMinimum() == 0 && m_watcher.progressMaximum() == 0) {
m_progress->setRange(0, 1);
m_progress->setValue(1);
}
if (m_watcher.future().isCanceled()) { if (m_watcher.future().isCanceled()) {
m_progress->setError(true); m_progress->setError(true);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment