Skip to content

Commit

Permalink
Revert [=] to fix implicit capture of 'this' via '[=]' is deprecated …
Browse files Browse the repository at this point in the history
…in C++20 error

WE2-1003
  • Loading branch information
mrts committed Sep 20, 2024
1 parent f63b040 commit b3731cb
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/ui/webeiddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,13 @@ void WebEidDialog::onMultipleCertificatesReady(
case CommandType::AUTHENTICATE:
ui->selectAnotherCertificate->disconnect();
ui->selectAnotherCertificate->setVisible(certificateAndPinInfos.size() > 1);
connect(ui->selectAnotherCertificate, &QPushButton::clicked, this, [=] {
// We set pinInput to empty text instead of clear() to also reset undo buffer
ui->pinInput->setText({});
onMultipleCertificatesReady(origin, certificateAndPinInfos);
});
setupOK([=] {
connect(ui->selectAnotherCertificate, &QPushButton::clicked, this,
[this, origin, certificateAndPinInfos] {
// We set pinInput to empty text instead of clear() to also reset undo buffer
ui->pinInput->setText({});
onMultipleCertificatesReady(origin, certificateAndPinInfos);
});
setupOK([this, origin] {
ui->okButton->setDisabled(true);
// Authenticate continues with the selected certificate to onSingleCertificateReady().
if (auto* button =
Expand Down Expand Up @@ -380,7 +381,7 @@ void WebEidDialog::onSingleCertificateReady(const QUrl& origin,
switch (currentCommand) {
case CommandType::GET_SIGNING_CERTIFICATE:
setupCertificateAndPinInfo({certAndPin});
setupOK([=] {
setupOK([this, certAndPin] {
ui->okButton->setDisabled(true);
emit accepted(certAndPin);
});
Expand Down Expand Up @@ -553,7 +554,7 @@ void WebEidDialog::setTrText(QWidget* label, Text text) const
void WebEidDialog::connectOkToCachePinAndEmitSelectedCertificate(
const CardCertificateAndPinInfo& certAndPin)
{
setupOK([=] {
setupOK([this, certAndPin] {
ui->pinInput->hide();
ui->pinTitleLabel->hide();
ui->pinErrorLabel->hide();
Expand Down

0 comments on commit b3731cb

Please sign in to comment.