aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/utils/GpgUtils.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/utils/GpgUtils.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/utils/GpgUtils.cpp')
-rw-r--r--src/core/utils/GpgUtils.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/utils/GpgUtils.cpp b/src/core/utils/GpgUtils.cpp
index 7ee78a31..75a412e7 100644
--- a/src/core/utils/GpgUtils.cpp
+++ b/src/core/utils/GpgUtils.cpp
@@ -28,8 +28,6 @@
#include "GpgUtils.h"
-#include <boost/algorithm/string.hpp>
-
namespace GpgFrontend {
inline auto Trim(QString& s) -> QString { return s.trimmed(); }
@@ -88,12 +86,9 @@ auto CheckGpgError(GpgError err, const QString& /*comment*/) -> GpgError {
}
auto TextIsSigned(QString text) -> int {
- using boost::algorithm::ends_with;
- using boost::algorithm::starts_with;
-
auto trim_text = Trim(text);
- if (starts_with(trim_text, PGP_SIGNED_BEGIN) &&
- ends_with(trim_text, PGP_SIGNED_END)) {
+ if (trim_text.startsWith(PGP_SIGNED_BEGIN) &&
+ trim_text.endsWith(PGP_SIGNED_END)) {
return 2;
}
if (text.contains(PGP_SIGNED_BEGIN) && text.contains(PGP_SIGNED_END)) {