aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/key_generate/KeygenDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/key_generate/KeygenDialog.cpp')
-rw-r--r--src/ui/key_generate/KeygenDialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/key_generate/KeygenDialog.cpp b/src/ui/key_generate/KeygenDialog.cpp
index 6df0bcf0..676539c7 100644
--- a/src/ui/key_generate/KeygenDialog.cpp
+++ b/src/ui/key_generate/KeygenDialog.cpp
@@ -28,10 +28,10 @@
#include "ui/key_generate/KeygenDialog.h"
-#include "dialog/WaitingDialog.h"
+#include "core/function/GlobalSettingStation.h"
#include "core/function/gpg/GpgKeyOpera.h"
+#include "dialog/WaitingDialog.h"
#include "ui/SignalStation.h"
-#include "core/function/GlobalSettingStation.h"
namespace GpgFrontend::UI {
@@ -144,15 +144,19 @@ void KeyGenDialog::slot_key_gen_accept() {
dialog->close();
+ LOG(INFO) << "generate done";
+
if (gpgme_err_code(error) == GPG_ERR_NO_ERROR) {
- auto* msg_box = new QMessageBox(nullptr);
+ auto* msg_box = new QMessageBox((QWidget*)this->parent());
msg_box->setAttribute(Qt::WA_DeleteOnClose);
msg_box->setStandardButtons(QMessageBox::Ok);
msg_box->setWindowTitle(_("Success"));
msg_box->setText(_("The new key pair has been generated."));
- msg_box->setModal(false);
+ msg_box->setModal(true);
msg_box->open();
+ LOG(INFO) << "generate success";
+
emit SignalKeyGenerated();
this->close();
} else {