aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgGenKeyInfo.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-12 15:08:38 +0000
committersaturneric <[email protected]>2024-01-12 15:08:38 +0000
commit6983b5c1dd82d159236ebd06cf17f071cc9c1ee9 (patch)
treefc53f790e33546320b2ecd306a1a9ade6fbdfe7a /src/core/model/GpgGenKeyInfo.cpp
parentfix: slove a heap-use-after-free issue (diff)
downloadGpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.tar.gz
GpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.zip
refactor: remove boost and use QString instead of std::filesystem::path
Diffstat (limited to 'src/core/model/GpgGenKeyInfo.cpp')
-rw-r--r--src/core/model/GpgGenKeyInfo.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/model/GpgGenKeyInfo.cpp b/src/core/model/GpgGenKeyInfo.cpp
index 3e705f16..60f76d96 100644
--- a/src/core/model/GpgGenKeyInfo.cpp
+++ b/src/core/model/GpgGenKeyInfo.cpp
@@ -144,14 +144,14 @@ void GenKeyInfo::SetKeyLength(int m_key_size) {
GenKeyInfo::key_size_ = m_key_size;
}
-void GenKeyInfo::SetExpireTime(const boost::posix_time::ptime &m_expired) {
+void GenKeyInfo::SetExpireTime(const QDateTime &m_expired) {
if (!IsNonExpired()) {
GenKeyInfo::expired_ = m_expired;
}
}
void GenKeyInfo::SetNonExpired(bool m_non_expired) {
- if (!m_non_expired) this->expired_ = boost::posix_time::from_time_t(0);
+ if (!m_non_expired) this->expired_ = QDateTime::fromSecsSinceEpoch(0);
GenKeyInfo::non_expired_ = m_non_expired;
}
@@ -293,10 +293,9 @@ void GenKeyInfo::SetComment(const QString &m_comment) {
/**
* @brief Get the Expired object
*
- * @return const boost::posix_time::ptime&
+ * @return const QDateTime&
*/
-[[nodiscard]] auto GenKeyInfo::GetExpireTime() const
- -> const boost::posix_time::ptime & {
+[[nodiscard]] auto GenKeyInfo::GetExpireTime() const -> const QDateTime & {
return expired_;
}