LanguageClient: move document symbol support check to client

Used there to prevent requesting document symbols from server that do
not support these requests.

Change-Id: Icca64c41415ba7098c769854823431fb05e5ce1d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-12-10 10:49:30 +01:00
parent 92156cc1d6
commit 348652dc26
6 changed files with 45 additions and 34 deletions

View File

@@ -278,8 +278,8 @@ void updateEditorToolBar(Core::IEditor *editor)
});
}
if (!extras->m_client || extras->m_client != client ||
!LanguageClientOutlineWidgetFactory::clientSupportsDocumentSymbols(client, document)) {
if (!extras->m_client || !client || extras->m_client != client
|| !client->supportsDocumentSymbols(document)) {
if (extras->m_outlineAction) {
widget->toolBar()->removeAction(extras->m_outlineAction);
delete extras->m_outlineAction;