aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/key_generate/KeygenDialog.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2022-05-09 14:40:54 +0000
committerSaturneric <[email protected]>2022-05-09 14:40:54 +0000
commit670733f7a90d337d546afab22ddedeedec6d3d67 (patch)
tree2c64c0667d2cac45040257802c40963f89737700 /src/ui/key_generate/KeygenDialog.cpp
parentdoc: add entry to developer document. (diff)
downloadGpgFrontend-670733f7a90d337d546afab22ddedeedec6d3d67.tar.gz
GpgFrontend-670733f7a90d337d546afab22ddedeedec6d3d67.zip
fix: fix crash poblem when doing operations
1. refactor GpgFunctionObject to solve shared library problem. 2. fix multi-threading issues in refreshing. 3. improve loading speed for key list 4. improve ui operation 5. do other fixing and improving operations
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 {