aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomtombstoneevent.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-26 14:02:49 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-26 14:02:49 +0100
commitb3d62050befbb1c526f03e4356f3263d197c45f2 (patch)
tree37284e7f8274245d223a394975e8acf6ada63c02 /lib/events/roomtombstoneevent.cpp
parentf4a0acf818c4c89d132b2ec96d47c5817b106149 (diff)
downloadlibquotient-b3d62050befbb1c526f03e4356f3263d197c45f2.tar.gz
libquotient-b3d62050befbb1c526f03e4356f3263d197c45f2.zip
Event: deprecate originalJson[Object]()
The "original JSON" wording is misleading: the returned JSON can be and is routinely edited as a part of event construction, redaction, editing. Also, originalJson() name is misleading in that it returns a stringified (in a very specific way) JSON and not an object. You have to call fullJson() to get the object, and originalJsonObject(), confusingly, returns exactly the same thing but as a value rather than as a reference. The original intention of keeping originalJsonObject() was to make it Q_INVOKABLE or use it as an accessor for a Q_PROPERTY. unfortunately, this was never really practical as discussed in the previous commit. All that implies that clients have to handle passing event JSON to QML themselves, in the form they prefer (as an object or a string). The added complexity is negligible though; on the other hand, there's added flexibility in, e.g., choosing a compact instead of default JSON layout or even generate a highlighted JSON representation.
Diffstat (limited to 'lib/events/roomtombstoneevent.cpp')
0 files changed, 0 insertions, 0 deletions