aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotFunction.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-07-22 18:54:52 +0000
committerSaturneric <[email protected]>2022-07-22 18:56:08 +0000
commitff73042072c1937c8ee20cabab3f16cf38d588b1 (patch)
treef269b6178a5318cbf1c7945bbcd6d7a0736d104f /src/ui/main_window/MainWindowSlotFunction.cpp
parentrefactor(ui): adjust file structure (diff)
downloadGpgFrontend-ff73042072c1937c8ee20cabab3f16cf38d588b1.tar.gz
GpgFrontend-ff73042072c1937c8ee20cabab3f16cf38d588b1.zip
fix(ui): fix signer picker and other issues
1. signer picker can cancel its operation now 2. fix window title of "Export As Key Package"
Diffstat (limited to '')
-rw-r--r--src/ui/main_window/MainWindowSlotFunction.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp
index 9108a124..f715046c 100644
--- a/src/ui/main_window/MainWindowSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowSlotFunction.cpp
@@ -26,7 +26,6 @@
*
*/
-#include <cstddef>
#include <memory>
#include <string>
#include <utility>
@@ -34,15 +33,12 @@
#include "MainWindow.h"
#include "core/GpgConstants.h"
#include "core/GpgModel.h"
-#include "core/function/GlobalSettingStation.h"
#include "core/function/gpg/GpgBasicOperator.h"
#include "core/function/gpg/GpgKeyGetter.h"
#include "core/function/gpg/GpgKeyImportExporter.h"
-#include "core/model/GpgKey.h"
-#include "core/thread/TaskRunner.h"
#include "ui/UserInterfaceUtils.h"
#include "ui/dialog/help/AboutDialog.h"
-#include "ui/widgets/SignersPicker.h"
+#include "dialog/SignersPicker.h"
namespace GpgFrontend::UI {
/**
@@ -427,6 +423,9 @@ void MainWindow::slot_encrypt_sign() {
connect(signersPicker, &SignersPicker::finished, &loop, &QEventLoop::quit);
loop.exec();
+ // return when canceled
+ if (!signersPicker->GetStatus()) return;
+
auto signer_key_ids = signersPicker->GetCheckedSigners();
auto signer_keys = GpgKeyGetter::GetInstance().GetKeys(signer_key_ids);