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/test/core/GpgCoreTestKeygen.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/test/core/GpgCoreTestKeygen.cpp')
-rw-r--r-- | src/test/core/GpgCoreTestKeygen.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/core/GpgCoreTestKeygen.cpp b/src/test/core/GpgCoreTestKeygen.cpp index 93544d85..57e7cbb9 100644 --- a/src/test/core/GpgCoreTestKeygen.cpp +++ b/src/test/core/GpgCoreTestKeygen.cpp @@ -29,6 +29,8 @@ #include <gtest/gtest.h> #include <qeventloop.h> +#include <cstddef> + #include "GpgCoreTest.h" #include "core/function/gpg/GpgKeyGetter.h" #include "core/function/gpg/GpgKeyOpera.h" @@ -92,8 +94,8 @@ TEST_F(GpgCoreTest, GenerateKeyTest_1) { keygen_info->SetAlgo(std::get<1>(keygen_info->GetSupportedKeyAlgo()[0])); keygen_info->SetKeyLength(4096); keygen_info->SetNonExpired(false); - keygen_info->SetExpireTime(boost::posix_time::second_clock::local_time() + - boost::posix_time::hours(24)); + keygen_info->SetExpireTime( + QDateTime::currentDateTime().addSecs(static_cast<qint64>(24 * 3600))); keygen_info->SetNonPassPhrase(false); std::atomic_bool callback_called_flag{false}; |