LanguageClient: update outline after document

Update the outline sidebar widget after document changes are send to the
server like in the outline combobox in:

Amends ed199da1df

Change-Id: Iab58c0712a1c489576ed25a9b7e28f6f01e65946
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-07-09 14:08:24 +02:00
parent 4361103193
commit 5b18d1efa7

View File

@@ -153,8 +153,8 @@ LanguageClientOutlineWidget::LanguageClientOutlineWidget(Client *client,
&DocumentSymbolCache::gotSymbols,
this,
&LanguageClientOutlineWidget::handleResponse);
connect(editor->textDocument(), &TextEditor::TextDocument::contentsChanged, this, [this]() {
if (m_client)
connect(client, &Client::documentUpdated, this, [this](TextEditor::TextDocument *document) {
if (m_client && m_uri == DocumentUri::fromFilePath(document->filePath()))
m_client->documentSymbolCache()->requestSymbols(m_uri);
});