From 99fb1947f327465c364d2bac7642be49e1aab754 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 14 Apr 2021 11:18:13 +0200 Subject: [PATCH] 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 --- src/plugins/languageclient/progressmanager.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/languageclient/progressmanager.cpp b/src/plugins/languageclient/progressmanager.cpp index 2c45a33328c..ec7688c3651 100644 --- a/src/plugins/languageclient/progressmanager.cpp +++ b/src/plugins/languageclient/progressmanager.cpp @@ -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) { - progress.progressInterface->setKeepOnFinish( - Core::FutureProgress::KeepOnFinishTillUserInteraction); + 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); }