diff options
author | Saturneric <[email protected]> | 2021-05-24 18:34:02 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-24 18:34:02 +0000 |
commit | d989b48429ff9e37316d3c5c523e3cf53bbf5907 (patch) | |
tree | 892f187bdc8e493a7278892757da778d81c2432c /src/ui/KeyMgmt.cpp | |
parent | Declare and Define getSigners; (diff) | |
download | GpgFrontend-d989b48429ff9e37316d3c5c523e3cf53bbf5907.tar.gz GpgFrontend-d989b48429ff9e37316d3c5c523e3cf53bbf5907.zip |
Streamline, expand and improve the interface of GpgContext.
Fix the wrong use of the query interface for fingerprints or identifiers at VerifyKeyDetailBox.cpp and VerifyNotification.cpp.
Write the processing logic and page logic for adding a signature to the key.
Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rwxr-xr-x | src/ui/KeyMgmt.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/ui/KeyMgmt.cpp b/src/ui/KeyMgmt.cpp index b1699483..d40928ee 100755 --- a/src/ui/KeyMgmt.cpp +++ b/src/ui/KeyMgmt.cpp @@ -234,8 +234,7 @@ void KeyMgmt::deleteKeysWithWarning(QStringList *uidList) } QString keynames; for (const auto &uid : *uidList) { - GpgKey key; - mCtx->getKeyDetails(uid, key); + auto &key = mCtx->getKeyById(uid); keynames.append(key.name); keynames.append("<i> <"); keynames.append(key.email); @@ -258,9 +257,7 @@ void KeyMgmt::slotShowKeyDetails() return; } - GpgKey key; - - mCtx->getKeyDetails(mKeyList->getSelected()->first(), key); + auto &key = mCtx->getKeyById(mKeyList->getSelected()->first()); new KeyDetailsDialog(mCtx, key); } @@ -271,8 +268,7 @@ void KeyMgmt::slotExportKeyToFile() if (!mCtx->exportKeys(mKeyList->getChecked(), keyArray)) { return; } - GpgKey key; - mCtx->getKeyDetails(mKeyList->getChecked()->first(), key); + auto &key = mCtx->getKeyById(mKeyList->getSelected()->first()); QString fileString = key.name + " " + key.email+ "(" + key.id+ ")_pub.asc"; QString fileName = QFileDialog::getSaveFileName(this, tr("Export Key To File"), fileString, tr("Key Files") + " (*.asc *.txt);;All Files (*)"); |