Copilot: Add a warning in the settings page

... about copilot operation.

Change-Id: I9187f1759f183f4df393e057dc0cdb3307665afc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-06-22 09:44:08 +02:00
parent 0f2fbe4f6f
commit 4625d9e87e

View File

@@ -27,9 +27,22 @@ public:
{
using namespace Layouting;
auto warningLabel = new QLabel;
warningLabel->setWordWrap(true);
warningLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse
| Qt::LinksAccessibleByKeyboard
| Qt::TextSelectableByMouse);
warningLabel->setText(Tr::tr(
"Enabling %1 is subject to your agreement and abidance with your applicable "
"%1 terms. It is your responsibility to know and accept the requirements and "
"parameters of using tools like %1. This may include, but is not limited to, "
"ensuring you have the rights to allow %1 access to your code, as well as "
"understanding any implications of your use of %1 and suggestions produced "
"(like copyright, accuracy, etc.)." ).arg("Copilot"));
auto authWidget = new AuthWidget();
QLabel *helpLabel = new QLabel();
auto helpLabel = new QLabel();
helpLabel->setTextFormat(Qt::MarkdownText);
helpLabel->setWordWrap(true);
helpLabel->setTextInteractionFlags(Qt::LinksAccessibleByMouse
@@ -52,6 +65,8 @@ public:
"[agent.js](https://github.com/github/copilot.vim/tree/release/copilot/dist)"));
Column {
QString("<b>" + Tr::tr("Note:") + "</b>"), br,
warningLabel, br,
authWidget, br,
CopilotSettings::instance().enableCopilot, br,
CopilotSettings::instance().nodeJsPath, br,