Commit 5c17c73c authored by Ahmad Samir's avatar Ahmad Samir
Browse files

SetInitialPinCommand: port to PMF signal/slot syntax

Before the previous commit slotDialogRejected/Accepted() couldn't be
called in the Functors in connect(), as the captured 'this' pointer was a
pointer to non-const.
parent 96e1fa23
......@@ -53,10 +53,10 @@ private:
dlg->setWindowTitle(i18nc("@title:window", "Set Initial Pin"));
connect(dlg, SIGNAL(nksPinRequested()), q_func(), SLOT(slotNksPinRequested()));
connect(dlg, SIGNAL(sigGPinRequested()), q_func(), SLOT(slotSigGPinRequested()));
connect(dlg, SIGNAL(rejected()), q_func(), SLOT(slotDialogRejected()));
connect(dlg, SIGNAL(accepted()), q_func(), SLOT(slotDialogAccepted()));
connect(dlg, &SetInitialPinDialog::nksPinRequested, q_func(), [this]() { slotNksPinRequested(); });
connect(dlg, &SetInitialPinDialog::sigGPinRequested, q_func(), [this]() { slotSigGPinRequested(); });
connect(dlg, &QDialog::rejected, q_func(), [this]() { slotDialogRejected(); });
connect(dlg, &QDialog::accepted, q_func(), [this]() { slotDialogAccepted(); });
dialog = dlg;
......@@ -38,10 +38,6 @@ private:
class Private;
inline Private *d_func();
inline const Private *d_func() const;
Q_PRIVATE_SLOT(d_func(), void slotDialogRejected())
Q_PRIVATE_SLOT(d_func(), void slotDialogAccepted())
Q_PRIVATE_SLOT(d_func(), void slotNksPinRequested())
Q_PRIVATE_SLOT(d_func(), void slotSigGPinRequested())
Supports Markdown
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