aboutsummaryrefslogtreecommitdiffstats
path: root/keylist.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-10-17 22:33:29 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-10-17 22:33:29 +0000
commit10edb8b480f37f8d8dfb116d351a0e9deabe3af8 (patch)
tree04af66bc9d107197f4d75369e2ed9e84083c5dbc /keylist.cpp
parentadded keyserverimport with icon to toolbar in keymgmt (diff)
downloadgpg4usb-10edb8b480f37f8d8dfb116d351a0e9deabe3af8.tar.gz
gpg4usb-10edb8b480f37f8d8dfb116d351a0e9deabe3af8.zip
some text text changes, add method getKeyByFpr()
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@557 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'keylist.cpp')
-rw-r--r--keylist.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/keylist.cpp b/keylist.cpp
index 98f2fdb..f93f45f 100644
--- a/keylist.cpp
+++ b/keylist.cpp
@@ -105,26 +105,21 @@ void KeyList::refresh()
setChecked(keyList);
}
-QString KeyList::getKeyNameByFpr(QString fpr)
-{
- QString id;
- for (int i = 0; i < mKeyList->rowCount(); i++) {
- if (mKeyList->item(i, 5)->text() == fpr) {
- id=mKeyList->item(i,2)->text();
- }
- }
- return id;
-}
-
-QString KeyList::getKeyEmailByFpr(QString fpr)
-{
- QString id;
+/**
+ * note: privkey status is not returned
+ */
+GpgKey KeyList::getKeyByFpr(QString fpr) {
+ GpgKey key;
for (int i = 0; i < mKeyList->rowCount(); i++) {
if (mKeyList->item(i, 5)->text() == fpr) {
- id=mKeyList->item(i,3)->text();
+ //key.privkey = mKeyList->item(i,1)->text();
+ key.id = mKeyList->item(i,4)->text();
+ key.name = mKeyList->item(i,2)->text();
+ key.email = mKeyList->item(i,3)->text();
+ key.fpr = fpr;
}
}
- return id;
+ return key;
}
QStringList *KeyList::getChecked()