diff options
Diffstat (limited to 'keylist.cpp')
-rw-r--r-- | keylist.cpp | 27 |
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() |