aboutsummaryrefslogtreecommitdiffstats
path: root/verifydetailsdialog.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-10-17 23:49:14 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-10-17 23:49:14 +0000
commitd6f1fc5d0165d8cfc03f2f276addaf8bfb48f2b9 (patch)
treeb1dea76f4cf504c3bef580688e11f863591e0664 /verifydetailsdialog.cpp
parentclose verifynotification on textchange() (diff)
downloadgpg4usb-d6f1fc5d0165d8cfc03f2f276addaf8bfb48f2b9.tar.gz
gpg4usb-d6f1fc5d0165d8cfc03f2f276addaf8bfb48f2b9.zip
more visible error if GPG_ERR_BAD_SIGNATURE
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@561 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'verifydetailsdialog.cpp')
-rw-r--r--verifydetailsdialog.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/verifydetailsdialog.cpp b/verifydetailsdialog.cpp
index 7ccde37..8098210 100644
--- a/verifydetailsdialog.cpp
+++ b/verifydetailsdialog.cpp
@@ -56,18 +56,22 @@ void VerifyDetailsDialog::refresh()
timestamp.setTime_t(sign->timestamp);
// Set the title widget depending on sign status
- switch (mCtx->textIsSigned(text))
- {
- case 2:
- {
- mVboxLayout->addWidget(new QLabel(tr("Text was completely signed on\n %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleLongDate))));
- break;
- }
- case 1:
- {
- mVboxLayout->addWidget(new QLabel(tr("Text was partially signed on\n %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleLongDate))));
- break;
- }
+ if(gpg_err_code(sign->status) == GPG_ERR_BAD_SIGNATURE) {
+ mVboxLayout->addWidget(new QLabel(tr("Error Validating signature")));
+ } else {
+ switch (mCtx->textIsSigned(text))
+ {
+ case 2:
+ {
+ mVboxLayout->addWidget(new QLabel(tr("Text was completely signed on\n %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleLongDate))));
+ break;
+ }
+ case 1:
+ {
+ mVboxLayout->addWidget(new QLabel(tr("Text was partially signed on\n %1 by:\n").arg(timestamp.toString(Qt::SystemLocaleLongDate))));
+ break;
+ }
+ }
}
// Add informationbox for every single key