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-28 11:19:57 +0100 |
commit | 7c29f33121f58a52f43fa83183eaca47fa374980 (patch) | |
tree | afbc0a2dfd16e94b52266a37e798e7554ebe2aa5 /lib/events/event.cpp | |
parent | 639f1d482633a7adb72164c56e3b5ea429db96a5 (diff) | |
download | libquotient-7c29f33121f58a52f43fa83183eaca47fa374980.tar.gz libquotient-7c29f33121f58a52f43fa83183eaca47fa374980.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.
Diffstat (limited to 'lib/events/event.cpp')
-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(); |