diff --git a/src/plugins/copilot/CMakeLists.txt b/src/plugins/copilot/CMakeLists.txt index 81e0cd34934..2f4cfd3007b 100644 --- a/src/plugins/copilot/CMakeLists.txt +++ b/src/plugins/copilot/CMakeLists.txt @@ -7,7 +7,6 @@ add_qtc_plugin(Copilot copilotclient.cpp copilotclient.h copilotsettings.cpp copilotsettings.h copilotoptionspage.cpp copilotoptionspage.h - copilotoptionspagewidget.cpp copilotoptionspagewidget.h documentwatcher.cpp documentwatcher.h requests/getcompletions.h requests/checkstatus.h diff --git a/src/plugins/copilot/copilot.qbs b/src/plugins/copilot/copilot.qbs index e6a537a387e..e8813607ac6 100644 --- a/src/plugins/copilot/copilot.qbs +++ b/src/plugins/copilot/copilot.qbs @@ -19,8 +19,6 @@ QtcPlugin { "copilotsettings.h", "copilotoptionspage.cpp", "copilotoptionspage.h", - "copilotoptionspagewidget.cpp", - "copilotoptionspagewidget.h", "documentwatcher.cpp", "documentwatcher.h", "requests/getcompletions.h", diff --git a/src/plugins/copilot/copilotoptionspage.cpp b/src/plugins/copilot/copilotoptionspage.cpp index 67866fe8794..6fb49ef43c8 100644 --- a/src/plugins/copilot/copilotoptionspage.cpp +++ b/src/plugins/copilot/copilotoptionspage.cpp @@ -3,13 +3,41 @@ #include "copilotoptionspage.h" -#include "copilotoptionspagewidget.h" +#include "authwidget.h" +#include "copilotsettings.h" #include "copilotsettings.h" #include +#include +#include + +using namespace Utils; +using namespace LanguageClient; + namespace Copilot { +class CopilotOptionsPageWidget : public QWidget +{ +public: + CopilotOptionsPageWidget(QWidget *parent = nullptr) + : QWidget(parent) + { + using namespace Layouting; + + auto authWidget = new AuthWidget(); + + // clang-format off + Column { + authWidget, br, + CopilotSettings::instance().nodeJsPath, br, + CopilotSettings::instance().distPath, br, + st + }.attachTo(this); + // clang-format on + } +}; + CopilotOptionsPage::CopilotOptionsPage() { setId("Copilot.General"); diff --git a/src/plugins/copilot/copilotoptionspagewidget.cpp b/src/plugins/copilot/copilotoptionspagewidget.cpp deleted file mode 100644 index 549ea7f9ec6..00000000000 --- a/src/plugins/copilot/copilotoptionspagewidget.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// 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 "copilotoptionspagewidget.h" - -#include "authwidget.h" -#include "copilotsettings.h" - -#include -#include - -using namespace Utils; -using namespace LanguageClient; - -namespace Copilot { - -CopilotOptionsPageWidget::CopilotOptionsPageWidget(QWidget *parent) - : QWidget(parent) -{ - using namespace Layouting; - - auto authWdgt = new AuthWidget(); - - // clang-format off - Column { - authWdgt, br, - CopilotSettings::instance().nodeJsPath, br, - CopilotSettings::instance().distPath, br, - st - }.attachTo(this); - // clang-format on -} - -CopilotOptionsPageWidget::~CopilotOptionsPageWidget() = default; - -} // namespace Copilot diff --git a/src/plugins/copilot/copilotoptionspagewidget.h b/src/plugins/copilot/copilotoptionspagewidget.h deleted file mode 100644 index 37c51e68d3c..00000000000 --- a/src/plugins/copilot/copilotoptionspagewidget.h +++ /dev/null @@ -1,16 +0,0 @@ -// 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 - -#pragma once - -#include - -namespace Copilot { -class CopilotOptionsPageWidget : public QWidget -{ - Q_OBJECT -public: - CopilotOptionsPageWidget(QWidget *parent = nullptr); - ~CopilotOptionsPageWidget() override; -}; -} // namespace Copilot