aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/keygen/SubkeyGenerateThread.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-29 19:28:40 +0000
committerSaturneric <[email protected]>2021-05-29 19:28:40 +0000
commitfe67bfb777a79b25149efa3e045dc043dc144ad0 (patch)
tree4d75a10f210b86d7e116d188569bc08e4e72adb7 /src/ui/keygen/SubkeyGenerateThread.cpp
parentMake eligible keys enter the signature candidate list. (diff)
downloadGpgFrontend-fe67bfb777a79b25149efa3e045dc043dc144ad0.tar.gz
GpgFrontend-fe67bfb777a79b25149efa3e045dc043dc144ad0.zip
New page and function for generating subkeys.
Define the interface and functions of the subkey management tab. When there is an item in the UID list, the first item is selected by default. Compile the API for generating sub-keys and the corresponding calling thread. Set GpgGenKeyInfo to apply to the subkey Generate a subkey for the selected key pair of the management key pair interface. Adjust the project structure and add a new classification key generation category. Double-click the item in KeyList in the key pair management interface to enter the key details page. Adjust the title of the key pair management interface. Optimize part of the code of KeyGenThread. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'src/ui/keygen/SubkeyGenerateThread.cpp')
-rw-r--r--src/ui/keygen/SubkeyGenerateThread.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ui/keygen/SubkeyGenerateThread.cpp b/src/ui/keygen/SubkeyGenerateThread.cpp
new file mode 100644
index 00000000..8ccec66f
--- /dev/null
+++ b/src/ui/keygen/SubkeyGenerateThread.cpp
@@ -0,0 +1,19 @@
+//
+// Created by eric on 2021/5/30.
+//
+
+#include "ui/keygen/SubkeyGenerateThread.h"
+
+#include <utility>
+
+SubkeyGenerateThread::SubkeyGenerateThread(GpgKey key, GenKeyInfo *keyGenParams, GpgME::GpgContext *ctx)
+ : mKey(std::move(key)), keyGenParams(keyGenParams) , mCtx(ctx), abort(
+ false) {
+ connect(this, &SubkeyGenerateThread::finished, this, &SubkeyGenerateThread::deleteLater);
+}
+
+void SubkeyGenerateThread::run() {
+ bool success = mCtx->generateSubkey(mKey, keyGenParams);
+ emit signalKeyGenerated(success);
+ emit finished({});
+}