diff options
author | Saturneric <[email protected]> | 2022-07-22 17:21:48 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-07-22 17:21:48 +0000 |
commit | 8729378555af829cdb5ac1f0ab4b0dedff613644 (patch) | |
tree | 94ea60e78e3128c85429ac8f7b63fd7006beb96d /src/ui/keypair_details/KeyNewUIDDialog.cpp | |
parent | fix: fix some issues (diff) | |
download | GpgFrontend-8729378555af829cdb5ac1f0ab4b0dedff613644.tar.gz GpgFrontend-8729378555af829cdb5ac1f0ab4b0dedff613644.zip |
feat(ui): use general main window and dialog class
1. store window size and position
2. store icon size and style
Diffstat (limited to 'src/ui/keypair_details/KeyNewUIDDialog.cpp')
-rw-r--r-- | src/ui/keypair_details/KeyNewUIDDialog.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/keypair_details/KeyNewUIDDialog.cpp b/src/ui/keypair_details/KeyNewUIDDialog.cpp index 9ff73f9e..5b286603 100644 --- a/src/ui/keypair_details/KeyNewUIDDialog.cpp +++ b/src/ui/keypair_details/KeyNewUIDDialog.cpp @@ -32,7 +32,8 @@ namespace GpgFrontend::UI { KeyNewUIDDialog::KeyNewUIDDialog(const KeyId& key_id, QWidget* parent) - : QDialog(parent), m_key_(GpgKeyGetter::GetInstance().GetKey(key_id)) { + : GeneralDialog(typeid(KeyNewUIDDialog).name(), parent), + m_key_(GpgKeyGetter::GetInstance().GetKey(key_id)) { name_ = new QLineEdit(); name_->setMinimumWidth(240); email_ = new QLineEdit(); @@ -65,7 +66,8 @@ KeyNewUIDDialog::KeyNewUIDDialog(const KeyId& key_id, QWidget* parent) this->setAttribute(Qt::WA_DeleteOnClose, true); this->setModal(true); - connect(this, &KeyNewUIDDialog::SignalUIDCreated, SignalStation::GetInstance(), + connect(this, &KeyNewUIDDialog::SignalUIDCreated, + SignalStation::GetInstance(), &SignalStation::SignalKeyDatabaseRefresh); } @@ -84,9 +86,9 @@ void KeyNewUIDDialog::slot_create_new_uid() { } auto error_string = error_stream.str(); if (error_string.empty()) { - if (GpgUIDOperator::GetInstance().AddUID(m_key_, name_->text().toStdString(), - comment_->text().toStdString(), - email_->text().toStdString())) { + if (GpgUIDOperator::GetInstance().AddUID( + m_key_, name_->text().toStdString(), comment_->text().toStdString(), + email_->text().toStdString())) { emit finished(1); emit SignalUIDCreated(); } else |