diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-08 01:05:32 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-08 01:05:32 +0000 |
commit | af8aca311a267b623cc336cdc4cf16fba3b254c8 (patch) | |
tree | 1301376872257908c07bf43540ed8b9a5a7eb81e /gpgcontext.cpp | |
parent | set images in paragraph tags in integrated help and minor html code corrections (diff) | |
download | gpg4usb-af8aca311a267b623cc336cdc4cf16fba3b254c8.tar.gz gpg4usb-af8aca311a267b623cc336cdc4cf16fba3b254c8.zip |
added member mkeylist to gpgcontext for use in getkeybyfpr and getkeybyid
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@730 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgcontext.cpp')
-rw-r--r-- | gpgcontext.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gpgcontext.cpp b/gpgcontext.cpp index c06b4b5..14ee25b 100644 --- a/gpgcontext.cpp +++ b/gpgcontext.cpp @@ -96,6 +96,8 @@ GpgContext::GpgContext() debug = false; } + connect(this,SIGNAL(keyDBChanged()),this,SLOT(refreshKeyList())); + refreshKeyList(); } /** Destructor @@ -741,13 +743,17 @@ QString GpgContext::beautifyFingerprint(QString fingerprint) return fingerprint; } +void GpgContext::refreshKeyList() { + mKeyList = this->listKeys(); +} + /** * note: privkey status is not returned */ GpgKey GpgContext::getKeyByFpr(QString fpr) { - GpgKeyList list = this->listKeys(); - foreach (GpgKey key, list) { + //GpgKeyList list = this->listKeys(); + foreach (GpgKey key, mKeyList) { if(key.fpr == fpr) { return key; } @@ -762,8 +768,8 @@ GpgKey GpgContext::getKeyByFpr(QString fpr) { */ GpgKey GpgContext::getKeyById(QString id) { - GpgKeyList list = this->listKeys(); - foreach (GpgKey key, list) { + //GpgKeyList list = this->listKeys(); + foreach (GpgKey key, mKeyList) { if(key.id == id) { return key; } |