forked from qt-creator/qt-creator
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:
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include "copilotclient.h"
|
#include "copilotclient.h"
|
||||||
|
|
||||||
#include "copilotsettings.h"
|
|
||||||
|
|
||||||
#include <languageclient/languageclientinterface.h>
|
#include <languageclient/languageclientinterface.h>
|
||||||
#include <languageclient/languageclientmanager.h>
|
#include <languageclient/languageclientmanager.h>
|
||||||
#include <languageclient/languageclientsettings.h>
|
#include <languageclient/languageclientsettings.h>
|
||||||
@@ -35,13 +33,6 @@ static LanguageClient::BaseClientInterface *clientInterface(const FilePath &node
|
|||||||
return interface;
|
return interface;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CopilotClient *currentInstance = nullptr;
|
|
||||||
|
|
||||||
CopilotClient *CopilotClient::instance()
|
|
||||||
{
|
|
||||||
return currentInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
CopilotClient::CopilotClient(const FilePath &nodePath, const FilePath &distPath)
|
CopilotClient::CopilotClient(const FilePath &nodePath, const FilePath &distPath)
|
||||||
: LanguageClient::Client(clientInterface(nodePath, 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())
|
for (Core::IDocument *doc : Core::DocumentModel::openedDocuments())
|
||||||
openDoc(doc);
|
openDoc(doc);
|
||||||
currentInstance = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CopilotClient::openDocument(TextDocument *document)
|
void CopilotClient::openDocument(TextDocument *document)
|
||||||
|
@@ -25,8 +25,6 @@ class CopilotClient : public LanguageClient::Client
|
|||||||
public:
|
public:
|
||||||
explicit CopilotClient(const Utils::FilePath &nodePath, const Utils::FilePath &distPath);
|
explicit CopilotClient(const Utils::FilePath &nodePath, const Utils::FilePath &distPath);
|
||||||
|
|
||||||
static CopilotClient *instance();
|
|
||||||
|
|
||||||
void openDocument(TextEditor::TextDocument *document) override;
|
void openDocument(TextEditor::TextDocument *document) override;
|
||||||
|
|
||||||
void scheduleRequest(TextEditor::TextEditorWidget *editor);
|
void scheduleRequest(TextEditor::TextEditorWidget *editor);
|
||||||
|
Reference in New Issue
Block a user