Commit 4f2c8ba5 authored by Alexander Volkov's avatar Alexander Volkov

Connect slots explicitly instead of using auto-connections

Auto-connections is bad practice cause object renames break code
and it can't be detected at compile time.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent eb9c4c08
......@@ -66,6 +66,9 @@ AuthDialog::AuthDialog(const QString &actionId,
connect(userCB, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &AuthDialog::checkSelectedUser);
connect(buttonBox, &QDialogButtonBox::accepted, this, &AuthDialog::okClicked);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
......@@ -279,7 +282,7 @@ PolkitQt1::Identity AuthDialog::adminUserSelected() const
return PolkitQt1::Identity::fromString(id);
void AuthDialog::on_userCB_currentIndexChanged(int /*index*/)
void AuthDialog::checkSelectedUser()
PolkitQt1::Identity identity = adminUserSelected();
// itemData is Null when "Select user" is selected
......@@ -66,7 +66,7 @@ public slots:
void accept() override;
private slots:
void on_userCB_currentIndexChanged(int index);
void checkSelectedUser();
QString m_message;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment