Copilot: remove unused client instance function

Change-Id: I84c3d674bae1011a7b0bff070c2d3d5d89675147
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
David Schulz
2023-03-15 08:29:37 +01:00
parent 0d8d4322b4
commit 23513bb714
2 changed files with 0 additions and 12 deletions

View File

@@ -3,8 +3,6 @@
#include "copilotclient.h"
#include "copilotsettings.h"
#include <languageclient/languageclientinterface.h>
#include <languageclient/languageclientmanager.h>
#include <languageclient/languageclientsettings.h>
@@ -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)

View File

@@ -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);