forked from qt-creator/qt-creator
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:
@@ -153,8 +153,8 @@ LanguageClientOutlineWidget::LanguageClientOutlineWidget(Client *client,
|
|||||||
&DocumentSymbolCache::gotSymbols,
|
&DocumentSymbolCache::gotSymbols,
|
||||||
this,
|
this,
|
||||||
&LanguageClientOutlineWidget::handleResponse);
|
&LanguageClientOutlineWidget::handleResponse);
|
||||||
connect(editor->textDocument(), &TextEditor::TextDocument::contentsChanged, this, [this]() {
|
connect(client, &Client::documentUpdated, this, [this](TextEditor::TextDocument *document) {
|
||||||
if (m_client)
|
if (m_client && m_uri == DocumentUri::fromFilePath(document->filePath()))
|
||||||
m_client->documentSymbolCache()->requestSymbols(m_uri);
|
m_client->documentSymbolCache()->requestSymbols(m_uri);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user