aboutsummaryrefslogtreecommitdiff
path: root/lib/events/encryptionevent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events/encryptionevent.cpp')
-rw-r--r--lib/events/encryptionevent.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/events/encryptionevent.cpp b/lib/events/encryptionevent.cpp
index 6272c668..6e994cd4 100644
--- a/lib/events/encryptionevent.cpp
+++ b/lib/events/encryptionevent.cpp
@@ -47,11 +47,12 @@ EncryptionEventContent::EncryptionEventContent(EncryptionType et)
}
}
-void EncryptionEventContent::fillJson(QJsonObject* o) const
+QJsonObject EncryptionEventContent::toJson() const
{
- Q_ASSERT(o);
+ QJsonObject o;
if (encryption != EncryptionType::Undefined)
- o->insert(AlgorithmKey, algorithm);
- o->insert(RotationPeriodMsKey, rotationPeriodMs);
- o->insert(RotationPeriodMsgsKey, rotationPeriodMsgs);
+ o.insert(AlgorithmKey, algorithm);
+ o.insert(RotationPeriodMsKey, rotationPeriodMs);
+ o.insert(RotationPeriodMsgsKey, rotationPeriodMsgs);
+ return o;
}