forked from qt-creator/qt-creator
Copilot: Add LSP plugin for Copilot
Fixes: QTCREATORBUG-27771 Change-Id: I1249b9a4492427208a70b3e21bf20ac668fc3c50 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
46
src/plugins/copilot/copilotoptionspage.cpp
Normal file
46
src/plugins/copilot/copilotoptionspage.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (C) 2023 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "copilotoptionspage.h"
|
||||
|
||||
#include "copilotoptionspagewidget.h"
|
||||
#include "copilotsettings.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
namespace Copilot {
|
||||
|
||||
CopilotOptionsPage::CopilotOptionsPage()
|
||||
{
|
||||
setId("Copilot.General");
|
||||
setDisplayName("Copilot");
|
||||
setCategory("ZY.Copilot");
|
||||
setDisplayCategory("Copilot");
|
||||
|
||||
setCategoryIconPath(":/languageclient/images/settingscategory_languageclient.png");
|
||||
}
|
||||
|
||||
CopilotOptionsPage::~CopilotOptionsPage() {}
|
||||
|
||||
void CopilotOptionsPage::init() {}
|
||||
|
||||
QWidget *CopilotOptionsPage::widget()
|
||||
{
|
||||
return new CopilotOptionsPageWidget();
|
||||
}
|
||||
|
||||
void CopilotOptionsPage::apply()
|
||||
{
|
||||
CopilotSettings::instance().apply();
|
||||
CopilotSettings::instance().writeSettings(Core::ICore::settings());
|
||||
}
|
||||
|
||||
void CopilotOptionsPage::finish() {}
|
||||
|
||||
CopilotOptionsPage &CopilotOptionsPage::instance()
|
||||
{
|
||||
static CopilotOptionsPage settingsPage;
|
||||
return settingsPage;
|
||||
}
|
||||
|
||||
} // namespace Copilot
|
||||
Reference in New Issue
Block a user