aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/VerifyKeyDetailBox.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-22 15:58:59 +0000
committerSaturneric <[email protected]>2021-05-22 15:58:59 +0000
commitd9121e76c7eeb63b23a6a772d38e61b60abfe93d (patch)
tree965f9f27bba242a584b73ef4947ce54fa652390f /src/ui/VerifyKeyDetailBox.cpp
parentExpand and improve GpgKey; (diff)
downloadGpgFrontend-d9121e76c7eeb63b23a6a772d38e61b60abfe93d.tar.gz
GpgFrontend-d9121e76c7eeb63b23a6a772d38e61b60abfe93d.zip
Enhance code robustness;
Improve performance for GpgKey; Fix code defects. Makes the update response to changes in the key database directed. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'src/ui/VerifyKeyDetailBox.cpp')
-rw-r--r--src/ui/VerifyKeyDetailBox.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/VerifyKeyDetailBox.cpp b/src/ui/VerifyKeyDetailBox.cpp
index fda67d55..57f70a62 100644
--- a/src/ui/VerifyKeyDetailBox.cpp
+++ b/src/ui/VerifyKeyDetailBox.cpp
@@ -50,6 +50,8 @@ VerifyKeyDetailBox::VerifyKeyDetailBox(QWidget *parent, GpgME::GpgContext *ctx,
case GPG_ERR_NO_ERROR: {
GpgKey key = mCtx->getKeyByFpr(signature->fpr);
+ if(!key.good) break;
+
this->setTitle(key.name);
grid->addWidget(new QLabel(tr("Name:")), 0, 0);
grid->addWidget(new QLabel(tr("EMail:")), 1, 0);
@@ -65,6 +67,9 @@ VerifyKeyDetailBox::VerifyKeyDetailBox(QWidget *parent, GpgME::GpgContext *ctx,
}
default: {
GpgKey key = mCtx->getKeyById(signature->fpr);
+
+ if(!key.good) break;
+
this->setTitle(tr("Error for key with id 0x") + fpr);
grid->addWidget(new QLabel(tr("Name:")), 0, 0);
grid->addWidget(new QLabel(tr("EMail:")), 1, 0);