aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model')
-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; ///<