aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/KeygenDialog.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-26 14:53:51 +0000
committerSaturneric <[email protected]>2021-05-26 14:53:51 +0000
commit0739199b9e5a5bb0dc95efd309cc209a16ccea18 (patch)
tree1b9d87c3b4b57d3afef6353d2e2b79ccbf4fa3af /src/ui/KeygenDialog.cpp
parentRemove the self-compiled GpgME package (diff)
downloadGpgFrontend-0739199b9e5a5bb0dc95efd309cc209a16ccea18.tar.gz
GpgFrontend-0739199b9e5a5bb0dc95efd309cc209a16ccea18.zip
Fix the error and adjust the way the pop-up window pops up after the key is generated.
Diffstat (limited to 'src/ui/KeygenDialog.cpp')
-rw-r--r--src/ui/KeygenDialog.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/KeygenDialog.cpp b/src/ui/KeygenDialog.cpp
index 2b9fb88e..435194e1 100644
--- a/src/ui/KeygenDialog.cpp
+++ b/src/ui/KeygenDialog.cpp
@@ -143,6 +143,8 @@ void KeyGenDialog::slotKeyGenAccept() {
kg = new KeyGenThread(&genKeyInfo, mCtx);
+ connect(kg, SIGNAL(signalKeyGenerated(bool)), this, SLOT(slotKeyGenResult(bool)));
+
kg->start();
this->accept();
@@ -358,3 +360,9 @@ bool KeyGenDialog::check_email_address(const QString &str) {
return re_email.match(str).hasMatch();
}
+void KeyGenDialog::slotKeyGenResult(bool success) {
+ if(success)
+ QMessageBox::information(nullptr, tr("Success"), tr("The new key pair has been generated."));
+ else
+ QMessageBox::critical(nullptr, tr("Failure"), tr("An error occurred during key generation."));
+}