diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-12-27 18:33:51 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-12-27 19:00:22 +0100 |
commit | d6c2622b0cdc33ad272542ab611c15de07202520 (patch) | |
tree | 042adbf3b8cf55161d9a6649423c20f109dfbb5f /lib/events | |
parent | 58e260ef9b081344db8b375d20dbbf015350a3c8 (diff) | |
download | libquotient-d6c2622b0cdc33ad272542ab611c15de07202520.tar.gz libquotient-d6c2622b0cdc33ad272542ab611c15de07202520.zip |
More comments/documentation
Notably, recommend using loginFlowsChanged() rather than
homeserverChanged() to detect when a Connection object is ready for
a login sequence. Related: #427.
(cherry picked from commit 8981c5451ac378f16d5b57d7460d053e2cbc666e)
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/event.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/events/event.cpp b/lib/events/event.cpp index 96e33864..7b34114d 100644 --- a/lib/events/event.cpp +++ b/lib/events/event.cpp @@ -61,11 +61,14 @@ QString Event::matrixType() const { return fullJson()[TypeKeyL].toString(); } QByteArray Event::originalJson() const { return QJsonDocument(_json).toJson(); } +// On const below: this is to catch accidental attempts to change event JSON +// NOLINTNEXTLINE(readability-const-return-type) const QJsonObject Event::contentJson() const { return fullJson()[ContentKeyL].toObject(); } +// NOLINTNEXTLINE(readability-const-return-type) const QJsonObject Event::unsignedJson() const { return fullJson()[UnsignedKeyL].toObject(); |