LanguageClient: Add the possibility to override progress messages

... and make use of it in the clangd client.
We want the progress bar for background indexing to have a better title
than the plain (and non-translated) "indexing" that the clangd server
sends.

Change-Id: Ib75eac370e7c22f0c5bd477f4a4c423283b27e1f
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-04-20 15:13:10 +02:00
parent c1f90aeca2
commit 90a07eca28
5 changed files with 20 additions and 1 deletions

View File

@@ -1019,6 +1019,12 @@ void Client::setError(const QString &message)
m_state = Error;
}
void Client::setProgressTitleForToken(const LanguageServerProtocol::ProgressToken &token,
const QString &message)
{
m_progressManager.setTitleForToken(token, message);
}
void Client::handleMessage(const BaseMessage &message)
{
LanguageClientManager::logBaseMessage(LspLogMessage::ServerMessage, name(), message);