diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-11-21 20:12:54 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-11-21 20:12:54 +0000 |
commit | 91a80136a55db9c0e2dc63c98d0a5da838cd1998 (patch) | |
tree | 0d82ca8e7a3be17257358a792aabf32980615620 /gpgcontext.cpp | |
parent | also strike out revoked keys in keylist (diff) | |
download | gpg4usb-91a80136a55db9c0e2dc63c98d0a5da838cd1998.tar.gz gpg4usb-91a80136a55db9c0e2dc63c98d0a5da838cd1998.zip |
added dialog after key import
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@645 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgcontext.cpp')
-rw-r--r-- | gpgcontext.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gpgcontext.cpp b/gpgcontext.cpp index 77856f9..46edbe8 100644 --- a/gpgcontext.cpp +++ b/gpgcontext.cpp @@ -35,7 +35,6 @@ namespace GpgME */ GpgContext::GpgContext() { - /** get application path */ QString appPath = qApp->applicationDirPath(); @@ -103,14 +102,18 @@ GpgContext::~GpgContext() /** Import Key from QByteArray * */ -void GpgContext::importKey(QByteArray inBuffer) +gpgme_import_result_t GpgContext::importKey(QByteArray inBuffer) { err = gpgme_data_new_from_mem(&in, inBuffer.data(), inBuffer.size(), 1); checkErr(err); err = gpgme_op_import(mCtx, in); + gpgme_import_result_t result; + + + result = gpgme_op_import_result(mCtx); checkErr(err); gpgme_data_release(in); - emit keyDBChanged(); + return result; } /** Generate New Key with values params @@ -166,6 +169,11 @@ gpgme_key_t GpgContext::getKeyDetails(QString uid) return key; } +void GpgContext::sendKeyDBChanged() +{ + emit keyDBChanged(); +} + /** List all availabe Keys (VERY much like kgpgme) */ GpgKeyList GpgContext::listKeys() @@ -187,6 +195,7 @@ GpgKeyList GpgContext::listKeys() gpgkey.id = key->subkeys->keyid; gpgkey.fpr = key->subkeys->fpr; gpgkey.expired = (key->expired != 0); + gpgkey.revoked = (key->revoked != 0); if (key->uids) { gpgkey.name = key->uids->name; |