summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2019-05-13 15:20:24 +0200
committerDavid Schulz <david.schulz@qt.io>2019-05-17 10:26:12 +0000
commitd2030346f226754da5aefb03a9d9a4fe5eb271f8 (patch)
tree0ca9ffa936cfa5c25d1b9f8fbbef1031fd9a7dfa
parent166cb39709427085db7294c9f42a9847d9ce3a84 (diff)
downloadqt-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.cpp5
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;