forked from qt-creator/qt-creator
Copilot: Fix spinner if Copilot not configure
Previously the progress indicator would be visible if node.js or the lsp path was not configured. Change-Id: Ief235253c6cfcb8f8fb533fe746edc7d0cc5867c Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -91,9 +91,13 @@ void AuthWidget::updateClient(const Utils::FilePath &nodeJs, const Utils::FilePa
|
|||||||
{
|
{
|
||||||
LanguageClientManager::shutdownClient(m_client);
|
LanguageClientManager::shutdownClient(m_client);
|
||||||
m_client = nullptr;
|
m_client = nullptr;
|
||||||
setState(Tr::tr("Sign in"), true);
|
setState(Tr::tr("Sign in"), false);
|
||||||
if (!nodeJs.exists() || !agent.exists())
|
m_button->setEnabled(false);
|
||||||
|
if (!nodeJs.exists() || !agent.exists()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(Tr::tr("Sign in"), true);
|
||||||
|
|
||||||
m_client = new CopilotClient(nodeJs, agent);
|
m_client = new CopilotClient(nodeJs, agent);
|
||||||
connect(m_client, &Client::initialized, this, &AuthWidget::checkStatus);
|
connect(m_client, &Client::initialized, this, &AuthWidget::checkStatus);
|
||||||
|
|||||||
Reference in New Issue
Block a user