From 23513bb714e9551af54e7b4d1428fa3c6396c5e2 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 15 Mar 2023 08:29:37 +0100 Subject: [PATCH] Copilot: remove unused client instance function Change-Id: I84c3d674bae1011a7b0bff070c2d3d5d89675147 Reviewed-by: Reviewed-by: Marcus Tillmanns --- src/plugins/copilot/copilotclient.cpp | 10 ---------- src/plugins/copilot/copilotclient.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/src/plugins/copilot/copilotclient.cpp b/src/plugins/copilot/copilotclient.cpp index 06f127e645f..baf902c15fa 100644 --- a/src/plugins/copilot/copilotclient.cpp +++ b/src/plugins/copilot/copilotclient.cpp @@ -3,8 +3,6 @@ #include "copilotclient.h" -#include "copilotsettings.h" - #include #include #include @@ -35,13 +33,6 @@ static LanguageClient::BaseClientInterface *clientInterface(const FilePath &node return interface; } -static CopilotClient *currentInstance = nullptr; - -CopilotClient *CopilotClient::instance() -{ - return currentInstance; -} - CopilotClient::CopilotClient(const FilePath &nodePath, const FilePath &distPath) : LanguageClient::Client(clientInterface(nodePath, distPath)) { @@ -69,7 +60,6 @@ CopilotClient::CopilotClient(const FilePath &nodePath, const FilePath &distPath) for (Core::IDocument *doc : Core::DocumentModel::openedDocuments()) openDoc(doc); - currentInstance = this; } void CopilotClient::openDocument(TextDocument *document) diff --git a/src/plugins/copilot/copilotclient.h b/src/plugins/copilot/copilotclient.h index 42989e93f77..5111e04e1df 100644 --- a/src/plugins/copilot/copilotclient.h +++ b/src/plugins/copilot/copilotclient.h @@ -25,8 +25,6 @@ class CopilotClient : public LanguageClient::Client public: explicit CopilotClient(const Utils::FilePath &nodePath, const Utils::FilePath &distPath); - static CopilotClient *instance(); - void openDocument(TextEditor::TextDocument *document) override; void scheduleRequest(TextEditor::TextEditorWidget *editor);