diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-09-30 14:42:54 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-09-30 14:42:54 +0000 |
commit | 5b24ce3f27531da4cc63707c5010e746f7c5dcef (patch) | |
tree | 368602e891c2c3b4ecefcdc43c26ce0a1d079853 /gpgcontext.cpp | |
parent | bit more verifyparsing from kgpgme, still not fine (diff) | |
download | gpg4usb-5b24ce3f27531da4cc63707c5010e746f7c5dcef.tar.gz gpg4usb-5b24ce3f27531da4cc63707c5010e746f7c5dcef.zip |
more verifyparsing from kgpgme, kind of works in verifydetailsdialog now
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@990 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgcontext.cpp')
-rw-r--r-- | gpgcontext.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/gpgcontext.cpp b/gpgcontext.cpp index abc9d03..959e8e9 100644 --- a/gpgcontext.cpp +++ b/gpgcontext.cpp @@ -173,7 +173,7 @@ KgpgCore::KgpgKey GpgContext::getKeyDetails(QString uid) { GpgKeyList GpgContext::listKeys() { - KgpgInterface::readPublicKeys(); + //KgpgInterface::readPublicKeys(); GpgKeyList keys; @@ -313,12 +313,11 @@ sigTimeMessage(const QString &sigtime) if (!stamp.isValid()) return QString(); -/* return tr("first argument is formatted date, second argument is formatted time", - "The signature was created at %1 %2", - KGlobal::locale()->formatDate(stamp.date(), KLocale::LongDate), - KGlobal::locale()->formatTime(stamp.time(), KLocale::LongDate)) + - QLatin1String("<br/>");*/ - return "todo"; + return QObject::tr("The signature was created at %1 %2") + .arg(stamp.date().toString()) + .arg(stamp.time().toString() + QLatin1String("<br/>") + , "first argument is formatted date, second argument is formatted time"); + } QString GpgContext::getReport(const QStringList &log) @@ -346,6 +345,22 @@ QString GpgContext::getReport(const QStringList &log) const QStringList vsig = msg.mid(9).split(QLatin1Char(' '), QString::SkipEmptyParts); Q_ASSERT(vsig.count() >= 10); + //result += vsig[9]; + + GpgKey key = getKeyByFpr(vsig[9]); + + // ignore for now if this is signed with the primary id (vsig[0] == vsig[9]) or not + if (key.email.isEmpty()) { + result += tr("<qt>Good signature from:<br /><b>%1</b><br />Key ID: %2<br /></qt>") + .arg(key.name).arg(vsig[9]); + } else { + result += tr("Good signature from: NAME <EMAIL>, Key ID: HEXID", + "<qt>Good signature from:<br /><b>%1 <%2></b><br />Key ID: %3<br /></qt>") + .arg(key.name).arg(key.email).arg(vsig[9]); + } + result += sigTimeMessage(vsig[2]); + + /* const KGpgKeyNode *node = model->findKeyNode(vsig[9]); if (node != NULL) { |