forked from qt-creator/qt-creator
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:
@@ -100,11 +100,13 @@ void ProgressManager::endProgress(const ProgressToken &token, const WorkDoneProg
|
|||||||
{
|
{
|
||||||
const LanguageClientProgress &progress = m_progress.value(token);
|
const LanguageClientProgress &progress = m_progress.value(token);
|
||||||
const QString &message = end.message().value_or(QString());
|
const QString &message = end.message().value_or(QString());
|
||||||
if (!message.isEmpty() && progress.progressInterface) {
|
if (progress.progressInterface) {
|
||||||
|
if (!message.isEmpty()) {
|
||||||
progress.progressInterface->setKeepOnFinish(
|
progress.progressInterface->setKeepOnFinish(
|
||||||
Core::FutureProgress::KeepOnFinishTillUserInteraction);
|
Core::FutureProgress::KeepOnFinishTillUserInteraction);
|
||||||
|
}
|
||||||
progress.progressInterface->setSubtitle(message);
|
progress.progressInterface->setSubtitle(message);
|
||||||
progress.progressInterface->setSubtitleVisibleInStatusBar(true);
|
progress.progressInterface->setSubtitleVisibleInStatusBar(!message.isEmpty());
|
||||||
}
|
}
|
||||||
endProgress(token);
|
endProgress(token);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user