Skip to content

Commit

Permalink
Fixed signal connection in AccountManageDlg
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Mar 19, 2024
1 parent 33c6541 commit 36dc012
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/accountmanagedlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public slots:

private slots:
void remove();
void bg_clicked(int);
void bg_clicked(QAbstractButton *btn);

void client_handshaken();
void client_error();
Expand Down Expand Up @@ -112,9 +112,9 @@ AccountRemoveDlg::AccountRemoveDlg(const UserAccount &acc, QWidget *parent) : QD
d->bg = new QButtonGroup(this);
d->bg->addButton(rb_remove, 0);
d->bg->addButton(rb_removeAndUnreg, 1);
connect(d->bg, SIGNAL(buttonClicked(int)), SLOT(bg_clicked(int)));
connect(d->bg, &QButtonGroup::buttonClicked, this, &AccountRemoveDlg::bg_clicked);
rb_remove->setChecked(true);
bg_clicked(0);
bg_clicked(rb_remove);

client = new MiniClient(this);
connect(client, SIGNAL(handshaken()), SLOT(client_handshaken()));
Expand Down Expand Up @@ -146,8 +146,9 @@ void AccountRemoveDlg::done(int r)
QDialog::done(r);
}

void AccountRemoveDlg::bg_clicked(int x)
void AccountRemoveDlg::bg_clicked(QAbstractButton *btn)
{
auto x = d->bg->id(btn);
if (x == 0) {
lb_pass->setEnabled(false);
le_pass->setEnabled(false);
Expand Down

0 comments on commit 36dc012

Please sign in to comment.