Skip to content

Commit

Permalink
Move tcp server to class
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Mar 5, 2020
1 parent e69e970 commit 3135082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/setupdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/setupdialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ class SetupDialog : public QDialog
explicit SetupDialog(QWidget *parent = nullptr);
~SetupDialog() override;
private:
spt::Auth *auth;
spt::Auth *auth;
QTcpServer *server;
};

0 comments on commit 3135082

Please sign in to comment.