aboutsummaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-02-02 18:43:46 +0000
committersaturneric <[email protected]>2025-02-02 18:43:46 +0000
commitbec8f5e614884cb86e7f1c597b7a0767c99349d9 (patch)
treebfe24598ec22d7bef7e439d1f64dcd81e772fd98 /src/core
parentfeat: improve KeyGenerateDialog (diff)
downloadGpgFrontend-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.cpp4
-rw-r--r--src/core/model/GpgKeyGenerateInfo.h2
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; ///<