UpdateInfo: Show info when no updates are found

Show that no updates are found in the progress widget.
Also change the title to something nice and understandable.

Task-number: QTCREATORBUG-21584
Change-Id: I765509850d0454fa3c93b31586766d810ff6e392
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2019-03-29 13:48:25 +01:00
parent d2242babeb
commit fecf863b78
3 changed files with 25 additions and 2 deletions

View File

@@ -40,12 +40,17 @@ ShellCommand::ShellCommand(const QString &workingDirectory, const QProcessEnviro
this, &ShellCommand::coreAboutToClose);
}
FutureProgress *ShellCommand::futureProgress() const
{
return m_progress.data();
}
void ShellCommand::addTask(QFuture<void> &future)
{
const QString name = displayName();
const auto id = Core::Id::fromString(name + QLatin1String(".action"));
if (hasProgressParser()) {
ProgressManager::addTask(future, name, id);
m_progress = ProgressManager::addTask(future, name, id);
} else {
// add a timed tasked based on timeout
// we cannot access the future interface directly, so we need to create a new one
@@ -58,7 +63,7 @@ void ShellCommand::addTask(QFuture<void> &future)
watcher->deleteLater();
});
watcher->setFuture(future);
ProgressManager::addTimedTask(*fi, name, id, qMax(2, timeoutS() / 5)/*itsmagic*/);
m_progress = ProgressManager::addTimedTask(*fi, name, id, qMax(2, timeoutS() / 5)/*itsmagic*/);
}
}