Age | Commit message (Collapse) | Author |
|
|
|
Both now use through a common JsonConverter<> template class with its
base definition tuned for structs/QJsonObjects and specialisations for
non-object types. This new implementation doesn't work with virtual
fillJson functions yet (so EventContent classes still use toJson as a
member function) and does not cope quite well with non-constructible
objects (you have to specialise JsonConverter<> rather than, more
intuitively, JsonObjectConverter<>), but overall is more streamlined
compared to the previous implementation. It also fixes one important
issue that pushed for a rewrite: the previous implementation was not
working with structure hierarchies at all so (in particular) the Filter
part of CS API was totally disfunctional.
|
|
some compilers
A member function reference is not the same as a member function pointer.
|
|
|
|
== true
That is, instead of Q_ASSERTing in debug builds (release builds already work that way). The idea is that since the value is default-initialised anyway it can be used as a "blank canvas" to access specific fields inside the value's structure. The next commit will use that.
|
|
Keeping them protected extends API surface with no reasonable use from it (and for now derived classes don't access StateEvent<> data members directly, anyway).
|
|
Don't make JSON for event content only to parse it again; drop extraneous constructs.
|
|
|
|
|
|
It was accidentally (and incorrectly) used in tags sorting code;
will be dropped from Omittable<> in a later commit.
|
|
|
|
|
|
|
|
|
|
placeholder
Otherwise placeholder objects are confused with normal room JSON objects
when loading from the cache. Closes #257 (again).
|
|
|
|
You can't assign a QStringBuilder to auto.
|
|
Closes #257.
|
|
This allows to batch updates into signals being emitted only once per
sync. Also supercedes emitNamesChanged flag used in a few places.
|
|
|
|
|
|
|
|
SyncData now resides in its own pair of files and is capable to load either from file or from JSON. There is also (yet untested) capability to load rooms from files if a file name stands is the value for a given room id. This allows to store the master cache file separately from cache files for each room, massively easing the problem of bulky accounts that can overflow the poor capacity of Qt's JSON engine.
|
|
These two are intermingled in Room::addHistoricalMessageEvents because
processing empty events found in a historical batch is no different from
discovering (not lazy-loaded) members.
|
|
This was one more cause of #257 - the case when a redaction on a state
event arrives in the same batch as the redacted event.
|
|
|
|
|
|
A new recommended (and localisable) way of getting a piece of raw
response to display next to error messages as "details".
BaseJob::rawData() returns exactly the trimmed piece of data, no
"truncated" suffix there anymore.
|
|
|
|
Closes #258.
|
|
Brings event id of the state event that was in effect before this one arrived. This key is not specced but it's used in the wild since forever.
|
|
|
|
Also: use Matrix type instead of internal type id in StateEventKey
(Because internal type id maps to the library type system which will not
discern between Unknown events and therefore will mix together events of
different types in Room::Private::baseState/currentState. The Room code
is updated accordingly (bonus: more asserts there).)
Closes #255.
|
|
...that creates an "empty" event, i.e. an event with content initialised by a default constructor (not all content types support this but those for simple events do).
|
|
Also: make moveEventsToTimeline() always put historical events from
position -1 rather than 0 so that Private::baseState could always
correspond to the before-0 position.
|
|
- registerEventType(): comment the cryptic _ variable
- Room::postEvent: document the return value
- Room::Private: upgrade comments to doc-comments - even though in Private, they still are helpful to show hints in IDEs.
- General cleanup
|
|
|
|
Synced events always have their event ids, so checking those for event id renders most of the function useless (and returns an incorrect result). Closes #248.
|
|
document it
|
|
|
|
Closes #194.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nameForRoom() is O(n) in this context (n - number of names of a given
user).
|
|
Closes #127.
|
|
|