diff --git a/src/setupdialog.cpp b/src/setupdialog.cpp index f307c28e3..778e890d9 100644 --- a/src/setupdialog.cpp +++ b/src/setupdialog.cpp @@ -33,8 +33,8 @@ SetupDialog::SetupDialog(QWidget *parent) : QDialog(parent) QDesktopServices::openUrl(QUrl("https://developer.spotify.com/dashboard/applications")); }); auto authButton = new QPushButton("Authenticate"); - QTcpServer *server = nullptr; - QAbstractButton::connect(authButton, &QAbstractButton::clicked, [&](bool checked) { + server = nullptr; + QAbstractButton::connect(authButton, &QAbstractButton::clicked, [=](bool checked) { auto clientIdText = clientId->text(); auto clientSecretText = clientSecret->text(); clientId->setDisabled(true); diff --git a/src/setupdialog.hpp b/src/setupdialog.hpp index 18d849cd4..4249f71a0 100644 --- a/src/setupdialog.hpp +++ b/src/setupdialog.hpp @@ -21,5 +21,6 @@ class SetupDialog : public QDialog explicit SetupDialog(QWidget *parent = nullptr); ~SetupDialog() override; private: - spt::Auth *auth; + spt::Auth *auth; + QTcpServer *server; }; \ No newline at end of file