LanguageClient: remove dead code

All files that match the language filter are opened in the server
currently, no matter whether they belong to the project or not. We want
to track changes to files outside the project, because the project might
depend on those files.

Change-Id: If78142489ad22899f8bd899ae3a7ce3f58618fa3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2021-02-15 10:38:48 +01:00
parent 2845427d46
commit ab7560bec4
2 changed files with 0 additions and 16 deletions

View File

@@ -767,12 +767,7 @@ const ProjectExplorer::Project *Client::project() const
void Client::setCurrentProject(ProjectExplorer::Project *project)
{
using namespace ProjectExplorer;
if (m_project)
disconnect(m_project, &Project::fileListChanged, this, &Client::projectFileListChanged);
m_project = project;
if (m_project)
connect(m_project, &Project::fileListChanged, this, &Client::projectFileListChanged);
}
void Client::projectOpened(ProjectExplorer::Project *project)
@@ -809,16 +804,6 @@ void Client::projectClosed(ProjectExplorer::Project *project)
sendContent(change);
}
void Client::projectFileListChanged()
{
for (Core::IDocument *doc : Core::DocumentModel::openedDocuments()) {
if (m_project->isKnownFile(doc->filePath())) {
if (auto textDocument = qobject_cast<TextEditor::TextDocument *>(doc))
openDocument(textDocument);
}
}
}
void Client::setSupportedLanguage(const LanguageFilter &filter)
{
m_languagFilter = filter;

View File

@@ -128,7 +128,6 @@ public:
const ProjectExplorer::Project *project() const;
void projectOpened(ProjectExplorer::Project *project);
void projectClosed(ProjectExplorer::Project *project);
void projectFileListChanged();
void sendContent(const LanguageServerProtocol::IContent &content);
void cancelRequest(const LanguageServerProtocol::MessageId &id);