LanguageClient: remove outdated progress subtitle

If the work done end signal does not contain any message remove the
subtitle of the progress. Otherwise we still might show outdated
progress information on finished entries.

Change-Id: Ib1776e6cb1bacfa557b672182cd4e2c403266d1c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-04-14 11:18:13 +02:00
parent 9bf89a9a9c
commit 99fb1947f3

View File

@@ -100,11 +100,13 @@ void ProgressManager::endProgress(const ProgressToken &token, const WorkDoneProg
{
const LanguageClientProgress &progress = m_progress.value(token);
const QString &message = end.message().value_or(QString());
if (!message.isEmpty() && progress.progressInterface) {
if (progress.progressInterface) {
if (!message.isEmpty()) {
progress.progressInterface->setKeepOnFinish(
Core::FutureProgress::KeepOnFinishTillUserInteraction);
}
progress.progressInterface->setSubtitle(message);
progress.progressInterface->setSubtitleVisibleInStatusBar(true);
progress.progressInterface->setSubtitleVisibleInStatusBar(!message.isEmpty());
}
endProgress(token);
}