diff options
author | Saturneric <[email protected]> | 2021-05-21 16:15:54 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-21 16:15:54 +0000 |
commit | 21f4730e92d088c06dea01684f3f736f3f9beff0 (patch) | |
tree | c1dc4dc6836903adc688b03cafabc06fc845743f /src/ui/SettingsDialog.cpp | |
parent | Modified KeyList and Add Usage Support; (diff) | |
download | GpgFrontend-21f4730e92d088c06dea01684f3f736f3f9beff0.tar.gz GpgFrontend-21f4730e92d088c06dea01684f3f736f3f9beff0.zip |
Expand Key Details Dialog;
Expand and Improve GpgKey and GpgSubKey;
Change Interface getKeyDetails();
Code Modified;
Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rwxr-xr-x | src/ui/SettingsDialog.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ui/SettingsDialog.cpp b/src/ui/SettingsDialog.cpp index 1a1b090c..f7cd0c50 100755 --- a/src/ui/SettingsDialog.cpp +++ b/src/ui/SettingsDialog.cpp @@ -183,18 +183,19 @@ GeneralTab::GeneralTab(GpgME::GpgContext *ctx, QWidget *parent) // Fill the keyid hashmap keyIds.insert("", tr("<none>")); - foreach (QString keyid, *mKeyList->getAllPrivateKeys()) { - gpgme_key_t key = mCtx->getKeyDetails(keyid); + foreach (QString keyid, *mKeyList->getAllPrivateKeys()) { + GpgKey key; + mCtx->getKeyDetails(keyid, key); QString newKey = " (" + keyid + ")"; - if (!QString(key->uids->email).isEmpty()) { - newKey.prepend(" <" + QString::fromUtf8(key->uids->email) + ">"); + if (!QString(key.email).isEmpty()) { + newKey.prepend(" <" + key.email + ">"); } - if (!QString(key->uids->name).isEmpty()) { - newKey.prepend(" " + QString::fromUtf8(key->uids->name)); + if (!QString(key.name).isEmpty()) { + newKey.prepend(" " + key.name); } - keyIds.insert(key->uids->uid, newKey); + keyIds.insert(key.id, newKey); } - foreach(QString k, keyIds) { + foreach(QString k, keyIds) { ownKeySelectBox->addItem(k); } connect(ownKeySelectBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotOwnKeyIdChanged())); |