diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2013-10-16 00:12:15 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2013-10-16 00:12:15 +0000 |
commit | b1aa2b18da819cb6b236ca77639001c65b19ec6d (patch) | |
tree | 35ba66f97566731903fa15dcefc2609c8752ce71 | |
parent | show expiration (diff) | |
download | gpg4usb-b1aa2b18da819cb6b236ca77639001c65b19ec6d.tar.gz gpg4usb-b1aa2b18da819cb6b236ca77639001c65b19ec6d.zip |
try to handle revocation, TODO: test
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@1066 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | gpgcontext.cpp | 3 | ||||
-rw-r--r-- | qml/keydetails.qml | 13 | ||||
-rw-r--r-- | qmlpage.cpp | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/gpgcontext.cpp b/gpgcontext.cpp index 87860d5..31ed77f 100644 --- a/gpgcontext.cpp +++ b/gpgcontext.cpp @@ -77,8 +77,7 @@ GpgKeyList GpgContext::listKeys() key.id = kkey.id(); key.fullid = kkey.fullId(); key.name = kkey.name(); - // TODO - key.revoked = false; + key.revoked = !kkey.valid(); keys.append(key); } diff --git a/qml/keydetails.qml b/qml/keydetails.qml index ec3eb7e..148ad3d 100644 --- a/qml/keydetails.qml +++ b/qml/keydetails.qml @@ -50,6 +50,19 @@ Rectangle { visible: keymap.expired color: "#ff0000" } + + + Text { + id: text4 + x: 287 + y: 8 + text: qsTr("revoked") + font.italic: true + font.pixelSize: 22 + visible: keymap.revoked + color: "#ff0000" + } + } Rectangle { diff --git a/qmlpage.cpp b/qmlpage.cpp index 6ea3ecb..6a6c7bc 100644 --- a/qmlpage.cpp +++ b/qmlpage.cpp @@ -44,6 +44,7 @@ QMLPage::QMLPage(GpgME::GpgContext *ctx, KgpgCore::KgpgKey key, QWidget *parent) keymap.insert("fingerprint",key.fingerprintBeautified()); keymap.insert("isSecret",ctx->isSecretKey(key.id())); keymap.insert("expired", (key.expirationDate().date() < QDate::currentDate() &! key.expirationDate().isNull())); + keymap.insert("revoked", !key.valid()); context->setContextProperty("keymap", &keymap); qDebug() << "keydate vs current: " <<key.expirationDate().date() << " - "<< QDate::currentDate() << ":" << (key.expirationDate().date() < QDate::currentDate()); |