Skip to content

Commit

Permalink
UpdateInfo: Fix wrong properties for progress info
Browse files Browse the repository at this point in the history
It was no longer showing "No updates found." in the status bar if the
progress details are off, and the progress details were no longer
directly hidden if updates were found.

Amends 93401c9

Change-Id: I53c441a990c9cbda1a49969f57eb76128ab020c1
Reviewed-by: Jarek Kobus <[email protected]>
  • Loading branch information
e4z9 committed Nov 25, 2022
1 parent 2605639 commit a0e74ce
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/plugins/updateinfo/updateinfoplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,13 @@ void UpdateInfoPlugin::startCheckForUpdates()
return; // do not trigger while update task is already running

QFutureInterface<void> futureIf;
FutureProgress *futureProgress
= ProgressManager::addTimedTask(futureIf,
tr("Checking for Updates"),
Id("UpdateInfo.CheckingForUpdates"),
60);
futureProgress->setKeepOnFinish(FutureProgress::KeepOnFinishTillUserInteraction);
futureProgress->setSubtitleVisibleInStatusBar(true);
connect(futureProgress, &FutureProgress::canceled, this, [this, futureIf]() mutable {
d->m_progress = ProgressManager::addTimedTask(futureIf,
tr("Checking for Updates"),
Id("UpdateInfo.CheckingForUpdates"),
60);
d->m_progress->setKeepOnFinish(FutureProgress::KeepOnFinishTillUserInteraction);
d->m_progress->setSubtitleVisibleInStatusBar(true);
connect(d->m_progress, &FutureProgress::canceled, this, [this, futureIf]() mutable {
futureIf.reportCanceled();
futureIf.reportFinished();
stopCheckForUpdates();
Expand Down

0 comments on commit a0e74ce

Please sign in to comment.