aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/keypair_details/KeyUIDSignDialog.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-11-29 04:43:00 +0000
committerSaturneric <[email protected]>2021-11-29 04:47:06 +0000
commit839878e0a2c5dff8ed9d9422aaeebeee0e5ba964 (patch)
tree2b93ba3943053871ba39fd1b80966521bd77b4e8 /src/ui/keypair_details/KeyUIDSignDialog.cpp
parentFix Known Bugs. (diff)
downloadGpgFrontend-839878e0a2c5dff8ed9d9422aaeebeee0e5ba964.tar.gz
GpgFrontend-839878e0a2c5dff8ed9d9422aaeebeee0e5ba964.zip
Solve uid management, related update and other known issues.
Diffstat (limited to '')
-rw-r--r--src/ui/keypair_details/KeyUIDSignDialog.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/ui/keypair_details/KeyUIDSignDialog.cpp b/src/ui/keypair_details/KeyUIDSignDialog.cpp
index f49a16bc..0614024f 100644
--- a/src/ui/keypair_details/KeyUIDSignDialog.cpp
+++ b/src/ui/keypair_details/KeyUIDSignDialog.cpp
@@ -23,15 +23,16 @@
*/
#include "ui/keypair_details/KeyUIDSignDialog.h"
+
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyManager.h"
+#include "ui/SignalStation.h"
namespace GpgFrontend::UI {
-KeyUIDSignDialog::KeyUIDSignDialog(const GpgKey& key,
- const UIDArgsListPtr& uid,
+KeyUIDSignDialog::KeyUIDSignDialog(const GpgKey& key, UIDArgsListPtr uid,
QWidget* parent)
- : mKey(key), mUids(uid), QDialog(parent) {
+ : QDialog(parent), mUids(std::move(uid)), mKey(key) {
mKeyList =
new KeyList(KeyListRow::ONLY_SECRET_KEY,
KeyListColumn::NAME | KeyListColumn::EmailAddress, this);
@@ -90,18 +91,26 @@ KeyUIDSignDialog::KeyUIDSignDialog(const GpgKey& key,
this->adjustSize();
setAttribute(Qt::WA_DeleteOnClose, true);
+
+ connect(this, SIGNAL(signalKeyUIDSignUpdate()), SignalStation::GetInstance(),
+ SIGNAL(KeyDatabaseRefresh()));
}
void KeyUIDSignDialog::slotSignKey(bool clicked) {
+ LOG(INFO) << "KeyUIDSignDialog::slotSignKey Called";
+
// Set Signers
auto key_ids = mKeyList->getChecked();
- auto keys = GpgKeyGetter::GetInstance().GetKeys(std::move(key_ids));
+ auto keys = GpgKeyGetter::GetInstance().GetKeys(key_ids);
+ LOG(INFO) << "KeyUIDSignDialog::slotSignKey Key Info Got";
auto expires = std::make_unique<boost::gregorian::date>(
boost::posix_time::from_time_t(expiresEdit->dateTime().toTime_t())
.date());
+ LOG(INFO) << "KeyUIDSignDialog::slotSignKey Sign Start";
for (const auto& uid : *mUids) {
+ LOG(INFO) << "KeyUIDSignDialog::slotSignKey Sign UID" << uid;
// Sign For mKey
if (!GpgKeyManager::GetInstance().signKey(mKey, *keys, uid, expires)) {
QMessageBox::critical(
@@ -114,8 +123,8 @@ void KeyUIDSignDialog::slotSignKey(bool clicked) {
QMessageBox::information(
nullptr, tr("Operation Complete"),
tr("The signature operation of the UID is complete"));
-
this->close();
+ emit signalKeyUIDSignUpdate();
}
} // namespace GpgFrontend::UI