diff options
author | saturneric <[email protected]> | 2024-01-17 11:39:47 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-17 11:39:47 +0000 |
commit | e352e8e6b8d03a24ef5d52eef3e4d370807b5bbd (patch) | |
tree | 9a59f0b573a845644afe4b8857a89c4b28bdcc0d /src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp | |
parent | fix: solve the gnupg tab options info not shown issue (diff) | |
download | GpgFrontend-e352e8e6b8d03a24ef5d52eef3e4d370807b5bbd.tar.gz GpgFrontend-e352e8e6b8d03a24ef5d52eef3e4d370807b5bbd.zip |
fix: find and slove some bugs
Diffstat (limited to 'src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp')
-rw-r--r-- | src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp b/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp index a2870965..22d1db2a 100644 --- a/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp +++ b/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp @@ -126,6 +126,13 @@ void KeySetExpireDateDialog::init() { UISignalStation::GetInstance(), &UISignalStation::SignalKeyDatabaseRefresh); + if (m_key_.GetExpireTime().toSecsSinceEpoch() == 0) { + ui_->noExpirationCheckBox->setCheckState(Qt::Checked); + } else { + ui_->dateEdit->setDateTime(m_key_.GetExpireTime()); + ui_->timeEdit->setDateTime(m_key_.GetExpireTime()); + } + ui_->titleLabel->setText(tr("Modified Expiration Date (Local Time)")); ui_->label->setText(tr( "Tips: For the sake of security, the key is valid for up to two years. " @@ -133,6 +140,8 @@ void KeySetExpireDateDialog::init() { "settings.")); ui_->noExpirationCheckBox->setText(tr("No Expiration")); this->setWindowTitle(tr("Modified Expiration Date")); + this->setAttribute(Qt::WA_DeleteOnClose); + this->setModal(true); } void KeySetExpireDateDialog::slot_non_expired_checked(int state) { |