aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/KeyMgmt.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-01-03 22:10:04 +0000
committerSaturneric <[email protected]>2022-01-03 22:10:04 +0000
commit2f64e4300b77f74cc4a7f0f50dbfe87862b72b95 (patch)
tree0d56d21ed78b5b1377681338619ac79c32386335 /src/ui/KeyMgmt.cpp
parent<fix, feature>(core, ui): key package import. (diff)
downloadGpgFrontend-2f64e4300b77f74cc4a7f0f50dbfe87862b72b95.tar.gz
GpgFrontend-2f64e4300b77f74cc4a7f0f50dbfe87862b72b95.zip
<fix, feature>(core, ui): version system upgrade.
1. can notice user withdraw version now. 2. fix software not restart when signal caught. 3. improve ui.
Diffstat (limited to 'src/ui/KeyMgmt.cpp')
-rwxr-xr-xsrc/ui/KeyMgmt.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ui/KeyMgmt.cpp b/src/ui/KeyMgmt.cpp
index 18a076c7..3715b01a 100755
--- a/src/ui/KeyMgmt.cpp
+++ b/src/ui/KeyMgmt.cpp
@@ -371,8 +371,16 @@ void KeyMgmt::slotExportKeyToKeyPackage() {
}
void KeyMgmt::slotExportKeyToClipboard() {
- ByteArrayPtr key_export_data = nullptr;
+
auto keys_checked = key_list_->getChecked();
+ if (keys_checked->empty()) {
+ QMessageBox::critical(
+ this, _("Forbidden"),
+ _("Please check some keys before doing this operation."));
+ return;
+ }
+
+ ByteArrayPtr key_export_data = nullptr;
if (!GpgKeyImportExporter::GetInstance().ExportKeys(keys_checked,
key_export_data)) {
return;