diff options
author | saturneric <[email protected]> | 2024-01-12 15:08:38 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-12 15:08:38 +0000 |
commit | 6983b5c1dd82d159236ebd06cf17f071cc9c1ee9 (patch) | |
tree | fc53f790e33546320b2ecd306a1a9ade6fbdfe7a /src/core/model/GpgKey.cpp | |
parent | fix: slove a heap-use-after-free issue (diff) | |
download | GpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.tar.gz GpgFrontend-6983b5c1dd82d159236ebd06cf17f071cc9c1ee9.zip |
refactor: remove boost and use QString instead of std::filesystem::path
Diffstat (limited to 'src/core/model/GpgKey.cpp')
-rw-r--r-- | src/core/model/GpgKey.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/model/GpgKey.cpp b/src/core/model/GpgKey.cpp index 73c67045..a53aac5f 100644 --- a/src/core/model/GpgKey.cpp +++ b/src/core/model/GpgKey.cpp @@ -125,17 +125,17 @@ auto GpgKey::GetPublicKeyAlgo() const -> QString { return gpgme_pubkey_algo_name(key_ref_->subkeys->pubkey_algo); } -auto GpgKey::GetLastUpdateTime() const -> boost::posix_time::ptime { - return boost::posix_time::from_time_t( +auto GpgKey::GetLastUpdateTime() const -> QDateTime { + return QDateTime::fromSecsSinceEpoch( static_cast<time_t>(key_ref_->last_update)); } -auto GpgKey::GetExpireTime() const -> boost::posix_time::ptime { - return boost::posix_time::from_time_t(key_ref_->subkeys->expires); +auto GpgKey::GetExpireTime() const -> QDateTime { + return QDateTime::fromSecsSinceEpoch(key_ref_->subkeys->expires); }; -auto GpgKey::GetCreateTime() const -> boost::posix_time::ptime { - return boost::posix_time::from_time_t(key_ref_->subkeys->timestamp); +auto GpgKey::GetCreateTime() const -> QDateTime { + return QDateTime::fromSecsSinceEpoch(key_ref_->subkeys->timestamp); }; auto GpgKey::GetPrimaryKeyLength() const -> unsigned int { |