Skip to content

Commit

Permalink
Fix coverity errors
Browse files Browse the repository at this point in the history
WE2-1003

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Jul 29, 2024
1 parent 7e462b4 commit c1192ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/libelectronic-id
18 changes: 9 additions & 9 deletions src/ui/webeiddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ WebEidDialog::WebEidDialog(QWidget* parent) : WebEidUI(parent), ui(new Private)
++i;
}
menu->show();
menu->move(ui->langButton->geometry().bottomRight() - menu->geometry().topRight() + QPoint(0, 2));
menu->move(ui->langButton->geometry().bottomRight() - menu->geometry().topRight()
+ QPoint(0, 2));
connect(langGroup, qOverload<QAbstractButton*>(&QButtonGroup::buttonClicked), menu,
[this, menu](QAbstractButton* action) {
QSettings().setValue(QStringLiteral("lang"), action->property("lang"));
Expand Down Expand Up @@ -330,12 +331,11 @@ void WebEidDialog::onMultipleCertificatesReady(
case CommandType::AUTHENTICATE:
ui->selectAnotherCertificate->disconnect();
ui->selectAnotherCertificate->setVisible(certificateAndPinInfos.size() > 1);
connect(ui->selectAnotherCertificate, &QPushButton::clicked, this,
[this, origin, certificateAndPinInfos] {
ui->pinInput->clear();
onMultipleCertificatesReady(origin, certificateAndPinInfos);
});
setupOK([this, origin] {
connect(ui->selectAnotherCertificate, &QPushButton::clicked, this, [=] {
ui->pinInput->clear();
onMultipleCertificatesReady(origin, certificateAndPinInfos);
});
setupOK([=] {
ui->okButton->setDisabled(true);
// Authenticate continues with the selected certificate to onSingleCertificateReady().
if (auto* button =
Expand Down Expand Up @@ -371,7 +371,7 @@ void WebEidDialog::onSingleCertificateReady(const QUrl& origin,
switch (currentCommand) {
case CommandType::GET_SIGNING_CERTIFICATE:
setupCertificateAndPinInfo({certAndPin});
setupOK([this, certAndPin] {
setupOK([=] {
ui->okButton->setDisabled(true);
emit accepted(certAndPin);
});
Expand Down Expand Up @@ -540,7 +540,7 @@ void WebEidDialog::setTrText(QWidget* label, Text text) const
void WebEidDialog::connectOkToCachePinAndEmitSelectedCertificate(
const CardCertificateAndPinInfo& certAndPin)
{
setupOK([this, certAndPin] {
setupOK([=] {
ui->pinInput->hide();
ui->pinTitleLabel->hide();
ui->pinErrorLabel->hide();
Expand Down

0 comments on commit c1192ff

Please sign in to comment.