aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotFunction.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-08-21 16:26:07 +0000
committerSaturneric <[email protected]>2021-08-21 16:26:07 +0000
commit516e3286d8373157291c78a499dd7a54c025133e (patch)
treed6c6b252110339a8be4390136f916b064d5b6740 /src/ui/main_window/MainWindowSlotFunction.cpp
parentFixed. (diff)
downloadGpgFrontend-516e3286d8373157291c78a499dd7a54c025133e.tar.gz
GpgFrontend-516e3286d8373157291c78a499dd7a54c025133e.zip
Functions addition and improvement;
Design and adjustment of function architecture related to server access; Add a new module (advance);
Diffstat (limited to 'src/ui/main_window/MainWindowSlotFunction.cpp')
-rw-r--r--src/ui/main_window/MainWindowSlotFunction.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp
index d31ef73b..3d1d6f77 100644
--- a/src/ui/main_window/MainWindowSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowSlotFunction.cpp
@@ -25,6 +25,8 @@
#include "MainWindow.h"
#include "ui/SendMailDialog.h"
#include "ui/widgets/SignersPicker.h"
+#include "server/api/PubkeyUploader.h"
+#include "advance/UnknownSignersChecker.h"
/**
@@ -366,6 +368,16 @@ void MainWindow::slotEncryptSign() {
QApplication::processEvents();
}
+ if (settings.value("advanced/autoPubkeyExchange").toBool()) {
+ auto pubkeyUploader = PubkeyUploader(mCtx, signerKeys);
+ pubkeyUploader.start();
+ if(!pubkeyUploader.result()) {
+ QMessageBox::warning(nullptr,
+ tr("Warning"),
+ tr("Automatic public key exchange failed."));
+ }
+ }
+
dialog->close();
if (gpgme_err_code(error) == GPG_ERR_NO_ERROR) {
@@ -452,6 +464,13 @@ void MainWindow::slotDecryptVerify() {
QApplication::processEvents();
}
+ // Automatically import public keys that are not stored locally
+ if(settings.value("advanced/autoPubkeyExchange").toBool()) {
+ auto* checker = new UnknownSignersChecker(mCtx, v_result);
+ checker->start();
+ checker->deleteLater();
+ }
+
dialog->close();
infoBoard->associateTextEdit(edit->curTextPage());