forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user