aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotFunction.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-01 17:50:03 +0000
committersaturneric <[email protected]>2024-12-01 18:39:07 +0000
commit50e461fd0be08616b9786a7d0a01c18d40d264a0 (patch)
tree9721ab3b4da82a8edcbca4c67e8ef5687502cf74 /src/ui/main_window/MainWindowSlotFunction.cpp
parentfeat: adjust gpg related libs version and speed up devops build on windows (diff)
downloadGpgFrontend-50e461fd0be08616b9786a7d0a01c18d40d264a0.tar.gz
GpgFrontend-50e461fd0be08616b9786a7d0a01c18d40d264a0.zip
fix: discovered bugs on windows platform
Diffstat (limited to 'src/ui/main_window/MainWindowSlotFunction.cpp')
-rw-r--r--src/ui/main_window/MainWindowSlotFunction.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp
index ea772b3e..8b0f3121 100644
--- a/src/ui/main_window/MainWindowSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowSlotFunction.cpp
@@ -794,6 +794,10 @@ void MainWindow::SlotEncryptSignEML() {
// check if error occurred
if (slot_handle_module_error(p)) return -1;
+ if (!p["eml_data"].isEmpty()) {
+ edit_->SlotSetText2CurEMailPage(p.value("eml_data", ""));
+ }
+
if (!p["sign_capsule_id"].isEmpty() &&
!p["encr_capsule_id"].isEmpty()) {
auto v1 = UIModuleManager::GetInstance().GetCapsule(
@@ -803,13 +807,13 @@ void MainWindow::SlotEncryptSignEML() {
try {
auto sign_result = std::any_cast<GpgSignResult>(v1);
- auto encr_result = std::any_cast<GpgSignResult>(v1);
+ auto encr_result = std::any_cast<GpgEncryptResult>(v2);
auto sign_result_analyse = GpgSignResultAnalyse(
m_key_list_->GetCurrentGpgContextChannel(),
GPG_ERR_NO_ERROR, sign_result);
- auto encr_result_analyse = GpgSignResultAnalyse(
+ auto encr_result_analyse = GpgEncryptResultAnalyse(
m_key_list_->GetCurrentGpgContextChannel(),
- GPG_ERR_NO_ERROR, sign_result);
+ GPG_ERR_NO_ERROR, encr_result);
sign_result_analyse.Analyse();
encr_result_analyse.Analyse();
@@ -852,7 +856,9 @@ void MainWindow::SlotDecryptVerifyEML() {
// check if error occurred
if (slot_handle_module_error(p)) return -1;
- edit_->SlotSetText2CurEMailPage(p.value("eml_data", ""));
+ if (!p["eml_data"].isEmpty()) {
+ edit_->SlotSetText2CurEMailPage(p.value("eml_data", ""));
+ }
const auto mime = QByteArray::fromBase64(p["mime"].toLatin1());
const auto signature =