forked from qt-creator/qt-creator
UpdateInfo: Fix wrong properties for progress info
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 93401c9c81
Change-Id: I53c441a990c9cbda1a49969f57eb76128ab020c1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user