aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/model
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/gpg/model/GpgData.cpp4
-rw-r--r--src/gpg/model/GpgData.h7
-rw-r--r--src/gpg/model/GpgKey.cpp8
-rw-r--r--src/gpg/model/GpgKey.h13
-rw-r--r--src/gpg/model/GpgKeySignature.cpp8
-rw-r--r--src/gpg/model/GpgKeySignature.h16
-rw-r--r--src/gpg/model/GpgSubKey.cpp7
-rw-r--r--src/gpg/model/GpgSubKey.h8
-rw-r--r--src/gpg/model/GpgUID.cpp7
-rw-r--r--src/gpg/model/GpgUID.h16
10 files changed, 47 insertions, 47 deletions
diff --git a/src/gpg/model/GpgData.cpp b/src/gpg/model/GpgData.cpp
index 1ffff0c5..23cdaf2d 100644
--- a/src/gpg/model/GpgData.cpp
+++ b/src/gpg/model/GpgData.cpp
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
diff --git a/src/gpg/model/GpgData.h b/src/gpg/model/GpgData.h
index 30a1c496..e3202af6 100644
--- a/src/gpg/model/GpgData.h
+++ b/src/gpg/model/GpgData.h
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -42,8 +42,7 @@ class GpgData {
private:
struct __data_ref_deletor {
void operator()(gpgme_data_t _data) {
- if (_data != nullptr)
- gpgme_data_release(_data);
+ if (_data != nullptr) gpgme_data_release(_data);
}
};
diff --git a/src/gpg/model/GpgKey.cpp b/src/gpg/model/GpgKey.cpp
index a0511051..c14edd2d 100644
--- a/src/gpg/model/GpgKey.cpp
+++ b/src/gpg/model/GpgKey.cpp
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -44,8 +44,8 @@ GpgFrontend::GpgKey::subKeys() const {
return p_keys;
}
-std::unique_ptr<std::vector<GpgFrontend::GpgUID>>
-GpgFrontend::GpgKey::uids() const {
+std::unique_ptr<std::vector<GpgFrontend::GpgUID>> GpgFrontend::GpgKey::uids()
+ const {
auto p_uids = std::make_unique<std::vector<GpgUID>>();
auto uid_next = _key_ref->uids;
while (uid_next != nullptr) {
diff --git a/src/gpg/model/GpgKey.h b/src/gpg/model/GpgKey.h
index ecebf3b2..53c074e8 100644
--- a/src/gpg/model/GpgKey.h
+++ b/src/gpg/model/GpgKey.h
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -25,12 +25,12 @@
#ifndef GPGFRONTEND_GPGKEY_H
#define GPGFRONTEND_GPGKEY_H
-#include "GpgSubKey.h"
-#include "GpgUID.h"
-
#include <boost/date_time.hpp>
#include <boost/date_time/posix_time/conversion.hpp>
+#include "GpgSubKey.h"
+#include "GpgUID.h"
+
namespace GpgFrontend {
class GpgKey {
@@ -148,8 +148,7 @@ class GpgKey {
private:
struct _key_ref_deletor {
void operator()(gpgme_key_t _key) {
- if (_key != nullptr)
- gpgme_key_unref(_key);
+ if (_key != nullptr) gpgme_key_unref(_key);
}
};
diff --git a/src/gpg/model/GpgKeySignature.cpp b/src/gpg/model/GpgKeySignature.cpp
index d7e7c53e..8f937198 100644
--- a/src/gpg/model/GpgKeySignature.cpp
+++ b/src/gpg/model/GpgKeySignature.cpp
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -24,5 +24,5 @@
#include "gpg/model/GpgKeySignature.h"
-GpgFrontend::GpgKeySignature::GpgKeySignature(gpgme_key_sig_t sig) : _signature_ref(sig,
- [&](gpgme_key_sig_t signature) {}) {}
+GpgFrontend::GpgKeySignature::GpgKeySignature(gpgme_key_sig_t sig)
+ : _signature_ref(sig, [&](gpgme_key_sig_t signature) {}) {}
diff --git a/src/gpg/model/GpgKeySignature.h b/src/gpg/model/GpgKeySignature.h
index 9de6b074..70eaeb1c 100644
--- a/src/gpg/model/GpgKeySignature.h
+++ b/src/gpg/model/GpgKeySignature.h
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -25,15 +25,15 @@
#ifndef GPGFRONTEND_GPGKEYSIGNATURE_H
#define GPGFRONTEND_GPGKEYSIGNATURE_H
-#include "gpg/GpgConstants.h"
-
#include <boost/date_time.hpp>
#include <string>
+#include "gpg/GpgConstants.h"
+
namespace GpgFrontend {
class GpgKeySignature {
-public:
+ public:
[[nodiscard]] bool revoked() const { return _signature_ref->revoked; }
[[nodiscard]] bool expired() const { return _signature_ref->expired; }
[[nodiscard]] bool invalid() const { return _signature_ref->invalid; }
@@ -72,7 +72,7 @@ public:
GpgKeySignature &operator=(const GpgKeySignature &) = delete;
-private:
+ private:
using KeySignatrueRefHandler =
std::unique_ptr<struct _gpgme_key_sig,
std::function<void(gpgme_key_sig_t)>>;
@@ -80,6 +80,6 @@ private:
KeySignatrueRefHandler _signature_ref = nullptr;
};
-} // namespace GpgFrontend
+} // namespace GpgFrontend
-#endif // GPGFRONTEND_GPGKEYSIGNATURE_H
+#endif // GPGFRONTEND_GPGKEYSIGNATURE_H
diff --git a/src/gpg/model/GpgSubKey.cpp b/src/gpg/model/GpgSubKey.cpp
index 87476d56..83fbcaa2 100644
--- a/src/gpg/model/GpgSubKey.cpp
+++ b/src/gpg/model/GpgSubKey.cpp
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -23,4 +23,5 @@
*/
#include "gpg/model/GpgSubKey.h"
-GpgFrontend::GpgSubKey::GpgSubKey(gpgme_subkey_t subkey) : _subkey_ref(subkey, [&](gpgme_subkey_t subkey) {}) {}
+GpgFrontend::GpgSubKey::GpgSubKey(gpgme_subkey_t subkey)
+ : _subkey_ref(subkey, [&](gpgme_subkey_t subkey) {}) {}
diff --git a/src/gpg/model/GpgSubKey.h b/src/gpg/model/GpgSubKey.h
index edb52f44..5f65c507 100644
--- a/src/gpg/model/GpgSubKey.h
+++ b/src/gpg/model/GpgSubKey.h
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -24,11 +24,11 @@
#ifndef GPGFRONTEND_GPGSUBKEY_H
#define GPGFRONTEND_GPGSUBKEY_H
-#include "gpg/GpgConstants.h"
-
#include <boost/date_time.hpp>
#include <string>
+#include "gpg/GpgConstants.h"
+
namespace GpgFrontend {
class GpgSubKey {
diff --git a/src/gpg/model/GpgUID.cpp b/src/gpg/model/GpgUID.cpp
index ae58daf1..c0a63bab 100644
--- a/src/gpg/model/GpgUID.cpp
+++ b/src/gpg/model/GpgUID.cpp
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -24,4 +24,5 @@
#include "gpg/model/GpgUID.h"
-GpgFrontend::GpgUID::GpgUID(gpgme_user_id_t uid) : _uid_ref(uid, [&](gpgme_user_id_t uid) {}) {} \ No newline at end of file
+GpgFrontend::GpgUID::GpgUID(gpgme_user_id_t uid)
+ : _uid_ref(uid, [&](gpgme_user_id_t uid) {}) {} \ No newline at end of file
diff --git a/src/gpg/model/GpgUID.h b/src/gpg/model/GpgUID.h
index dbe084b8..66dba321 100644
--- a/src/gpg/model/GpgUID.h
+++ b/src/gpg/model/GpgUID.h
@@ -1,7 +1,7 @@
/**
- * This file is part of GPGFrontend.
+ * This file is part of GpgFrontend.
*
- * GPGFrontend is free software: you can redistribute it and/or modify
+ * GpgFrontend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -30,7 +30,7 @@
namespace GpgFrontend {
class GpgUID {
-public:
+ public:
[[nodiscard]] std::string name() const { return _uid_ref->name; }
[[nodiscard]] std::string email() const { return _uid_ref->email; }
@@ -43,8 +43,8 @@ public:
[[nodiscard]] bool invalid() const { return _uid_ref->invalid; }
- [[nodiscard]] std::unique_ptr<std::vector<GpgKeySignature>>
- signatures() const {
+ [[nodiscard]] std::unique_ptr<std::vector<GpgKeySignature>> signatures()
+ const {
auto sigs = std::make_unique<std::vector<GpgKeySignature>>();
auto sig_next = _uid_ref->signatures;
while (sig_next != nullptr) {
@@ -69,13 +69,13 @@ public:
GpgUID &operator=(const GpgUID &) = delete;
-private:
+ private:
using UidRefHandler = std::unique_ptr<struct _gpgme_user_id,
std::function<void(gpgme_user_id_t)>>;
UidRefHandler _uid_ref = nullptr;
};
-} // namespace GpgFrontend
+} // namespace GpgFrontend
-#endif // GPGFRONTEND_GPGUID_H \ No newline at end of file
+#endif // GPGFRONTEND_GPGUID_H \ No newline at end of file