diff options
author | Saturneric <[email protected]> | 2021-11-28 04:35:01 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-11-28 04:35:01 +0000 |
commit | b5b3ba7b1dc52a8dbae2a3a6970b44ede827f060 (patch) | |
tree | 7dffd4f4e6684d078616d88999590b95e8a56410 /src/ui/KeyMgmt.cpp | |
parent | UI Framework Modified. (diff) | |
download | GpgFrontend-b5b3ba7b1dc52a8dbae2a3a6970b44ede827f060.tar.gz GpgFrontend-b5b3ba7b1dc52a8dbae2a3a6970b44ede827f060.zip |
Can be compiled with minimal UI support.
Diffstat (limited to 'src/ui/KeyMgmt.cpp')
-rwxr-xr-x | src/ui/KeyMgmt.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ui/KeyMgmt.cpp b/src/ui/KeyMgmt.cpp index 6d15a1eb..6a070188 100755 --- a/src/ui/KeyMgmt.cpp +++ b/src/ui/KeyMgmt.cpp @@ -218,9 +218,9 @@ void KeyMgmt::createToolBars() { keyToolBar->addAction(exportKeyToClipboardAct); } -void KeyMgmt::slotImportKeys(ByteArrayPtr in_buffer) { - GpgImportInformation result = - GpgKeyImportExportor::GetInstance().ImportKey(std::move(in_buffer)); +void KeyMgmt::slotImportKeys(const std::string& in_buffer) { + GpgImportInformation result = GpgKeyImportExportor::GetInstance().ImportKey( + std::make_unique<ByteArray>(in_buffer)); new KeyImportDetailDialog(result, false, this); } @@ -230,8 +230,7 @@ void KeyMgmt::slotImportKeyFromFile() { tr("Key Files") + " (*.asc *.txt);;" + tr("Keyring files") + " (*.gpg);;All Files (*)"); if (!file_name.isNull()) { - slotImportKeys(std::make_unique<ByteArray>( - read_all_data_in_file(file_name.toStdString()))); + slotImportKeys(read_all_data_in_file(file_name.toStdString())); } } @@ -242,8 +241,7 @@ void KeyMgmt::slotImportKeyFromKeyServer() { void KeyMgmt::slotImportKeyFromClipboard() { QClipboard* cb = QApplication::clipboard(); - slotImportKeys(std::make_unique<ByteArray>( - cb->text(QClipboard::Clipboard).toUtf8().toStdString())); + slotImportKeys(cb->text(QClipboard::Clipboard).toUtf8().toStdString()); } void KeyMgmt::slotDeleteSelectedKeys() { |