diff options
author | David Schulz <david.schulz@qt.io> | 2019-05-13 15:20:24 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2019-05-17 10:26:12 +0000 |
commit | d2030346f226754da5aefb03a9d9a4fe5eb271f8 (patch) | |
tree | 0ca9ffa936cfa5c25d1b9f8fbbef1031fd9a7dfa | |
parent | 166cb39709427085db7294c9f42a9847d9ce3a84 (diff) | |
download | qt-creator-d2030346f226754da5aefb03a9d9a4fe5eb271f8.tar.gz |
LanguageClient: update outline after document changes
Change-Id: I45b9107ccf812582a6138b469ded57e978bce267
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | src/plugins/languageclient/languageclientoutline.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/languageclient/languageclientoutline.cpp b/src/plugins/languageclient/languageclientoutline.cpp index 53e771bfd1..e12feb5eca 100644 --- a/src/plugins/languageclient/languageclientoutline.cpp +++ b/src/plugins/languageclient/languageclientoutline.cpp @@ -140,6 +140,11 @@ LanguageClientOutlineWidget::LanguageClientOutlineWidget(Client *client, &DocumentSymbolCache::gotSymbols, this, &LanguageClientOutlineWidget::handleResponse); + connect(editor->textDocument(), &TextEditor::TextDocument::contentsChanged, this, [this]() { + if (m_client) + m_client->documentSymbolCache()->requestSymbols(m_uri); + }); + client->documentSymbolCache()->requestSymbols(m_uri); auto *layout = new QVBoxLayout; |