aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/model/GpgKey.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model/GpgKey.cpp')
-rw-r--r--src/core/model/GpgKey.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/model/GpgKey.cpp b/src/core/model/GpgKey.cpp
index 6608d885..3efb53fc 100644
--- a/src/core/model/GpgKey.cpp
+++ b/src/core/model/GpgKey.cpp
@@ -37,6 +37,9 @@ GpgKey::GpgKey(gpgme_key_t key)
if (ptr != nullptr) gpgme_key_unref(ptr);
}) {}
+GpgKey::GpgKey(QSharedPointer<struct _gpgme_key> key_ref)
+ : key_ref_(std::move(key_ref)) {}
+
GpgKey::operator gpgme_key_t() const { return key_ref_.get(); }
GpgKey::GpgKey(const GpgKey &) = default;
@@ -218,4 +221,5 @@ auto GpgKey::PrimaryKey() const -> GpgSubKey {
}
auto GpgKey::IsSubKey() const -> bool { return false; }
+
} // namespace GpgFrontend \ No newline at end of file