aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmerrors.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-01-04 15:25:49 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-05-08 17:43:58 +0200
commitd271a171dbec4068e43e8f711d5d2e966a2072ac (patch)
tree02b77722adf1f187074bf45b6ef62ae77e35c67a /lib/e2ee/qolmerrors.cpp
parent09ecce1744344f1bfbacd31c8f300440a4139be4 (diff)
downloadlibquotient-d271a171dbec4068e43e8f711d5d2e966a2072ac.tar.gz
libquotient-d271a171dbec4068e43e8f711d5d2e966a2072ac.zip
Simplify EventContent a bit
Main changes: 1. Base::fillJson() gets a QJsonObject& instead of QJsonObject* - c'mon, there's nothing inherently wrong with using an lvalue reference for a read-write parameter. 2. UrlWithThumbnailContent merged into UrlBasedContent. The original UrlBasedContent was only used to produce a single class, AudioContent, and even that can logically have a thumbnail even if the spec doesn't provision that. And there's no guarantee even for visual content (ImageContent, e.g.) to have thumbnail data; the fallback is already tested. 3. toInfoJson is converted from a template to a couple of overloads that supersede fillInfoJson() member functions in FileInfo/ImageInfo. These overloads are easier on the eye; and clang-tidy no more warns about ImageInfo::fillInfoJson() shadowing FileInfo::fillInfoJson(). 4. Now that UrlWithThumbnail is gone, PlayableContent can directly derive from UrlBasedContent since both its specialisations use it. 5. Instead of FileInfo/ImageInfo, fillInfoJson() has been reinvented within UrlBasedContent so that, in particular, PlayableContent wouldn't need to extract 'info' subobject and then roll it back inside the content JSON object.
Diffstat (limited to 'lib/e2ee/qolmerrors.cpp')
0 files changed, 0 insertions, 0 deletions