forked from qt-creator/qt-creator
Copilot: Update authenticator widget while changing settings
Use a separate client for the authenticator widget that can react on changes in the settings widget. This removes the need to manually apply the settings between setting up the nodejs and agent.js paths and signing into github. Change-Id: I6628a3a8906ccbba208f9dac968262df962f93c0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -25,11 +25,12 @@ class AuthWidget : public QWidget
|
||||
|
||||
public:
|
||||
explicit AuthWidget(QWidget *parent = nullptr);
|
||||
void updateClient(const Utils::FilePath &nodeJs, const Utils::FilePath &agent);
|
||||
|
||||
private:
|
||||
void onClientAdded(LanguageClient::Client *client);
|
||||
void setState(const QString &buttonText, bool working);
|
||||
void checkStatus(Internal::CopilotClient *client);
|
||||
void checkStatus();
|
||||
|
||||
|
||||
void signIn();
|
||||
void signOut();
|
||||
@@ -39,6 +40,7 @@ private:
|
||||
QPushButton *m_button = nullptr;
|
||||
QLabel *m_statusLabel = nullptr;
|
||||
Utils::ProgressIndicator *m_progressIndicator = nullptr;
|
||||
Internal::CopilotClient *m_client = nullptr;
|
||||
};
|
||||
|
||||
} // namespace Copilot
|
||||
|
||||
Reference in New Issue
Block a user