forked from qt-creator/qt-creator
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:
@@ -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*/);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user