aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2021-12-25 16:56:17 +0100
committerTobias Fella <fella@posteo.de>2021-12-25 16:56:17 +0100
commit5af76cb4bedaea85bf8e2a8538fabe4e47d40e1a (patch)
tree6e31dbdebebc59999b5127beb56f511e9687e3f7 /lib
parent43470ab005512acb5f137aa6b9026ebcf3fcc142 (diff)
downloadlibquotient-5af76cb4bedaea85bf8e2a8538fabe4e47d40e1a.tar.gz
libquotient-5af76cb4bedaea85bf8e2a8538fabe4e47d40e1a.zip
Remove unneeded code
Diffstat (limited to 'lib')
-rw-r--r--lib/converters.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/converters.cpp b/lib/converters.cpp
index 6cbb554d..b80f5985 100644
--- a/lib/converters.cpp
+++ b/lib/converters.cpp
@@ -8,21 +8,11 @@
QJsonValue Quotient::JsonConverter<QVariant>::dump(const QVariant& v)
{
- if (v.canConvert<SignedOneTimeKey>()) {
- return toJson(v.value<SignedOneTimeKey>());
- }
return QJsonValue::fromVariant(v);
}
QVariant Quotient::JsonConverter<QVariant>::load(const QJsonValue& jv)
{
- if (jv.isObject()) {
- const QJsonObject obj = jv.toObject();
- if (obj.contains(QLatin1String("key")) && obj.contains(QLatin1String("signatures"))) {
- SignedOneTimeKey signedOneTimeKeys;
- signedOneTimeKeys.key = obj[QLatin1String("key")].toString();
- }
- }
return jv.toVariant();
}