aboutsummaryrefslogtreecommitdiffstats
path: root/src/MainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/MainWindow.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index cf100a14..f4d2badb 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -855,8 +855,7 @@ void MainWindow::slotCopyMailAddressToClipboard() {
if (mKeyList->getSelected()->isEmpty()) {
return;
}
- GpgKey key;
- mCtx->getKeyDetails(mKeyList->getSelected()->first(), key);
+ auto &key = mCtx->getKeyById(mKeyList->getSelected()->first());
QClipboard *cb = QApplication::clipboard();
QString mail = key.email;
cb->setText(mail);
@@ -866,8 +865,7 @@ void MainWindow::slotShowKeyDetails() {
if (mKeyList->getSelected()->isEmpty()) {
return;
}
- GpgKey key;
- mCtx->getKeyDetails(mKeyList->getSelected()->first(), key);
+ auto &key = mCtx->getKeyById(mKeyList->getSelected()->first());
if (key.good) {
new KeyDetailsDialog(mCtx, key, this);
}