From ff73042072c1937c8ee20cabab3f16cf38d588b1 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sat, 23 Jul 2022 02:54:52 +0800 Subject: 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" --- src/ui/main_window/MainWindowFileSlotFunction.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui/main_window/MainWindowFileSlotFunction.cpp') diff --git a/src/ui/main_window/MainWindowFileSlotFunction.cpp b/src/ui/main_window/MainWindowFileSlotFunction.cpp index 4ab23a22..526c27c0 100644 --- a/src/ui/main_window/MainWindowFileSlotFunction.cpp +++ b/src/ui/main_window/MainWindowFileSlotFunction.cpp @@ -32,8 +32,8 @@ #include "core/function/gpg/GpgFileOpera.h" #include "core/function/gpg/GpgKeyGetter.h" #include "core/thread/Task.h" +#include "dialog/SignersPicker.h" #include "ui/UserInterfaceUtils.h" -#include "ui/widgets/SignersPicker.h" namespace GpgFrontend::UI { @@ -618,6 +618,9 @@ void MainWindow::SlotFileEncryptSign() { connect(signersPicker, &SignersPicker::finished, &loop, &QEventLoop::quit); loop.exec(); + // return when canceled + if (!signersPicker->GetStatus()) return; + auto signer_key_ids = signersPicker->GetCheckedSigners(); auto p_signer_keys = GpgKeyGetter::GetInstance().GetKeys(signer_key_ids); -- cgit v1.2.3