aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/keypair_details/KeyPairOperaTab.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2022-05-13 19:31:40 +0000
committerGitHub <[email protected]>2022-05-13 19:31:40 +0000
commit49090d1d511a4a0fbcfac253656a40a42716c82e (patch)
tree2553bd9a1d14c099a0a990576fb7c874f72b3859 /src/ui/keypair_details/KeyPairOperaTab.cpp
parentMerge pull request #60 from saturneric/develop-2.0.7 (diff)
parentfix(core): solve memory access issues (diff)
downloadGpgFrontend-49090d1d511a4a0fbcfac253656a40a42716c82e.tar.gz
GpgFrontend-49090d1d511a4a0fbcfac253656a40a42716c82e.zip
Merge pull request #62 from saturneric/develop-2.0.8v2.0.8
Develop 2.0.8
Diffstat (limited to 'src/ui/keypair_details/KeyPairOperaTab.cpp')
-rw-r--r--src/ui/keypair_details/KeyPairOperaTab.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/ui/keypair_details/KeyPairOperaTab.cpp b/src/ui/keypair_details/KeyPairOperaTab.cpp
index 988ce527..4f7cd66f 100644
--- a/src/ui/keypair_details/KeyPairOperaTab.cpp
+++ b/src/ui/keypair_details/KeyPairOperaTab.cpp
@@ -145,8 +145,12 @@ void KeyPairOperaTab::slot_export_public_key() {
_("An error occurred during the export operation."));
return;
}
- auto file_string = m_key_.GetName() + " " + m_key_.GetEmail() + "(" +
+
+ // generate a file name
+ auto file_string = m_key_.GetName() + "<" + m_key_.GetEmail() + ">(" +
m_key_.GetId() + ")_pub.asc";
+ std::replace(file_string.begin(), file_string.end(), ' ', '_');
+
auto file_name =
QFileDialog::getSaveFileName(
this, _("Export Key To File"), QString::fromStdString(file_string),
@@ -188,8 +192,11 @@ void KeyPairOperaTab::slot_export_short_private_key() {
_("An error occurred during the export operation."));
return;
}
- auto file_string = m_key_.GetName() + " " + m_key_.GetEmail() + "(" +
+
+ auto file_string = m_key_.GetName() + "<" + m_key_.GetEmail() + ">(" +
m_key_.GetId() + ")_short_secret.asc";
+ std::replace(file_string.begin(), file_string.end(), ' ', '_');
+
auto file_name =
QFileDialog::getSaveFileName(
this, _("Export Key To File"), QString::fromStdString(file_string),
@@ -228,8 +235,10 @@ void KeyPairOperaTab::slot_export_private_key() {
_("An error occurred during the export operation."));
return;
}
- auto file_string = m_key_.GetName() + " " + m_key_.GetEmail() + "(" +
+ auto file_string = m_key_.GetName() + "<" + m_key_.GetEmail() + ">(" +
m_key_.GetId() + ")_full_secret.asc";
+ std::replace(file_string.begin(), file_string.end(), ' ', '_');
+
auto file_name =
QFileDialog::getSaveFileName(
this, _("Export Key To File"), QString::fromStdString(file_string),