diff options
author | saturneric <[email protected]> | 2025-02-02 18:43:46 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-02-02 18:43:46 +0000 |
commit | bec8f5e614884cb86e7f1c597b7a0767c99349d9 (patch) | |
tree | bfe24598ec22d7bef7e439d1f64dcd81e772fd98 /src/core | |
parent | feat: improve KeyGenerateDialog (diff) | |
download | GpgFrontend-bec8f5e614884cb86e7f1c597b7a0767c99349d9.tar.gz GpgFrontend-bec8f5e614884cb86e7f1c597b7a0767c99349d9.zip |
refactor: rewrite subkey generate dialog and fix some issues discovered
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/model/GpgKeyGenerateInfo.cpp | 4 | ||||
-rw-r--r-- | src/core/model/GpgKeyGenerateInfo.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/model/GpgKeyGenerateInfo.cpp b/src/core/model/GpgKeyGenerateInfo.cpp index fda6d09a..1493c3af 100644 --- a/src/core/model/GpgKeyGenerateInfo.cpp +++ b/src/core/model/GpgKeyGenerateInfo.cpp @@ -135,7 +135,9 @@ auto KeyGenerateInfo::GetSupportedSubkeyAlgo() -> QContainer<KeyAlgo> { } KeyGenerateInfo::KeyGenerateInfo(bool is_subkey) - : subkey_(is_subkey), algo_(kNoneAlgo) {} + : subkey_(is_subkey), + algo_(kNoneAlgo), + expired_(QDateTime::currentDateTime().toLocalTime().addYears(2)) {} auto KeyGenerateInfo::SearchPrimaryKeyAlgo(const QString &algo_id) -> std::tuple<bool, KeyAlgo> { diff --git a/src/core/model/GpgKeyGenerateInfo.h b/src/core/model/GpgKeyGenerateInfo.h index 0f3f2d70..54ec5a29 100644 --- a/src/core/model/GpgKeyGenerateInfo.h +++ b/src/core/model/GpgKeyGenerateInfo.h @@ -358,7 +358,7 @@ class GPGFRONTEND_CORE_EXPORT KeyGenerateInfo { QString comment_; ///< KeyAlgo algo_; ///< - QDateTime expired_ = QDateTime::currentDateTime().addYears(2); + QDateTime expired_; bool non_expired_ = false; ///< bool no_passphrase_ = false; ///< |