aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/KeygenThread.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-18 16:05:26 +0000
committerSaturneric <[email protected]>2021-05-18 16:05:26 +0000
commit8f141756363725866ac4bf2be0af93b3bb46a0d2 (patch)
tree77bbffb97555ac8baae57fa4a8bd13e5793f5c67 /src/ui/KeygenThread.cpp
parentSupport more Key Generating Algo. (diff)
downloadGpgFrontend-8f141756363725866ac4bf2be0af93b3bb46a0d2.tar.gz
GpgFrontend-8f141756363725866ac4bf2be0af93b3bb46a0d2.zip
Generate Key Upgraded.
RSA & DSA Tested. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'src/ui/KeygenThread.cpp')
-rw-r--r--src/ui/KeygenThread.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ui/KeygenThread.cpp b/src/ui/KeygenThread.cpp
index cd564c42..2f0a629c 100644
--- a/src/ui/KeygenThread.cpp
+++ b/src/ui/KeygenThread.cpp
@@ -21,14 +21,17 @@
#include "ui/KeygenThread.h"
-#include <utility>
-
-KeyGenThread::KeyGenThread(GenKeyInfo keyGenParams, GpgME::GpgContext *ctx) {
- this->keyGenParams = std::move(keyGenParams);
+KeyGenThread::KeyGenThread(GenKeyInfo* keyGenParams, GpgME::GpgContext *ctx) {
+ this->keyGenParams = keyGenParams;
this->mCtx = ctx;
abort = false;
}
void KeyGenThread::run() {
- mCtx->generateKey(&keyGenParams);
+ bool success = mCtx->generateKey(keyGenParams);
+ if(success)
+ QMessageBox::information(nullptr, tr("Success"), tr("New key created"));
+ else
+ QMessageBox::critical(nullptr, tr("Failure"), tr("Key generation failed"));
+
}