Copilot: Move AuthWidget update to the class itself

Change-Id: Iab23566c6d74760eab732fdbad2d9eac645faaff
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-07-14 16:36:07 +02:00
parent 17267bb15c
commit 3bfd60b708
2 changed files with 14 additions and 18 deletions

View File

@@ -189,22 +189,6 @@ public:
}.attachTo(this);
// clang-format on
auto updateAuthWidget = [authWidget]() {
authWidget->updateClient(
FilePath::fromUserInput(settings().nodeJsPath.volatileValue()),
FilePath::fromUserInput(settings().distPath.volatileValue()));
};
connect(settings().nodeJsPath.pathChooser(),
&PathChooser::textChanged,
authWidget,
updateAuthWidget);
connect(settings().distPath.pathChooser(),
&PathChooser::textChanged,
authWidget,
updateAuthWidget);
updateAuthWidget();
setOnApply([] {
settings().apply();
settings().writeSettings();