diff options
author | saturneric <[email protected]> | 2024-12-01 17:50:03 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-01 18:39:07 +0000 |
commit | 50e461fd0be08616b9786a7d0a01c18d40d264a0 (patch) | |
tree | 9721ab3b4da82a8edcbca4c67e8ef5687502cf74 | |
parent | feat: adjust gpg related libs version and speed up devops build on windows (diff) | |
download | GpgFrontend-50e461fd0be08616b9786a7d0a01c18d40d264a0.tar.gz GpgFrontend-50e461fd0be08616b9786a7d0a01c18d40d264a0.zip |
fix: discovered bugs on windows platform
m--------- | modules | 0 | ||||
-rw-r--r-- | src/core/module/ModuleInit.cpp | 8 | ||||
-rw-r--r-- | src/ui/main_window/MainWindowSlotFunction.cpp | 14 |
3 files changed, 17 insertions, 5 deletions
diff --git a/modules b/modules -Subproject 641913f44af94ebc00feea4a01bf3195a7dbd37 +Subproject 5f436558c23ade79b72516c882f345946e2586f diff --git a/src/core/module/ModuleInit.cpp b/src/core/module/ModuleInit.cpp index 175d35ad..977dd21e 100644 --- a/src/core/module/ModuleInit.cpp +++ b/src/core/module/ModuleInit.cpp @@ -50,7 +50,7 @@ auto SearchModuleFromPath(const QString& mods_path, auto LoadIntegratedMods() -> QMap<QString, bool> { const auto exec_binary_path = GlobalSettingStation::GetInstance().GetAppDir(); - QString mods_path = exec_binary_path + "/../modules"; + QString mods_path = exec_binary_path + "/modules"; #ifdef NDEBUG @@ -68,6 +68,12 @@ auto LoadIntegratedMods() -> QMap<QString, bool> { } #endif +#else + +#if defined(_WIN32) || defined(WIN32) + mods_path = exec_binary_path + "/../modules/bin"; +#endif + #endif if (!QDir(mods_path).exists()) { 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 = |