Age | Commit message (Collapse) | Author |
|
|
|
These changes are most harmless; a no more used Private class removed, and an incorrect signal specification in connect() fixed. Also, one explicit #include has been added, just in case.
|
|
Qt Creator turns out to be watching for "at :" substring in logs to detect messages that refer to files - which is not our case. Removing a comma fixes the alarm.
|
|
CMake tweaks
|
|
That list was bound to become outdated every now and then.
|
|
Qt5Core_DIR shows a path to the .cmake file's directory, which is a little too much information. The same change will be made in Quaternion, with the Qt prefix having additional usage in installation.
|
|
Room: added setLastReadEvent accessor and a signal for it; don't post receipts for own messages to the server
|
|
|
|
Room::markMessagesAsRead: use the iterator to the message, not after the message.
Room::setLastReadEvent: moved to protected
|
|
setLastReadEvent() is called in any case (read marks a stored in a hashmap so it's a constant time operation anyway); postReceipt() is now called for the nearest previous non-local message.
|
|
QJsonObject stock constructors are boring anyway - using QJsonObject::QJsonObject wasn't really necessary.
|
|
receipts for own messages to the server
As discussed with Matthew in #quaternion: https://matrix.to/#/!PCzUtxtOjUySxSelof:matrix.org/$14768896199130qcJqe:matrix.org
|
|
Merged as amended.
|
|
|
|
data() in each job class
|
|
MediaThumbnailJob: Use QSize instead of two separate int's for size
|
|
Connection::getThumbnail() is now overloaded to provide compatibility with the previous interface.
|
|
Event objects leaks plugged
|
|
|
|
|
|
|
|
The previous code had no effect because QVector<Receipt> was instantiated before Q_DECLARE_TYPEINFO occurence.
|
|
|
|
Normally, this shouldn't happen anyway - just a double-check,
|
|
This fixes a case when another person mentions you by disambiguated name, and this is not highlighted because Riot uses () and Quaternion uses <> to decorate disambiguated names (as well as to check mentions).
|
|
|
|
Push sender from RoomTopicEvent to Event
|
|
Fix messages ordering
|
|
Because it's supposed to exist in (at least) all events from /sync.
|
|
|
|
|
|
Connection: Don't return SyncJob* from sync()
|
|
|
|
This replaces the one-by-one timestamp-ordering algorithm of adding new
messages with copying the whole group of just-arrived messages to either
the beginning or the end of the timeline.
Since origin timestamps do not provide a reasonable order,
findInsertionPos() is entirely deleted. processMessageEvent() is
replaced by two functions: addNewMessageEvents() appends at
messageEvents.end() while addHistoricalMessageEvents() inserts them at
messageEvents.begin(). There's no official way to insert messages in the
middle; cases when getPreviousContent() is called in parallel or a
RoomMessagesJob runs on a gap somewhere in the middle of the timeline
weren't considered before this commit and aren't considered in it.
The new ordering requires you to understand where you have got your
events from (or rather, where you want to insert them). In particular,
updateData() that processes /sync results uses addNewMessageEvents();
getPreviousContent() calls addHistoricalMessageEvents().
In order to notify clients, a single newMessages() signal gives way to
3 new signals: 2 aboutToAdd*Messages() and a common addedMessages().
In addition, clients can derive from Room and use doAdd*Messages()
virtual functions to alter/extend the behaviour.
|
|
Given that Connection handles all the output from SyncJob already, there's no use in having the pointer. In fact, it's not used in Quaternion, and Tensor, to the contrary, has a problem _because_ this pointer is grabbed by the QML engine that mistakenly tries to handle its lifecycle.
|
|
deconstruction log line
|
|
Correct user sorting for room name creation
|
|
|
|
In the previous version, it was possible that u1 >= u2 and u2 >= u1:
Assume u1 == me, u1->id() < u2->id()
Then u1 >= u2, as u1 == me (i.e. it returns false)
but also u2 >= u1, as u2->id() > u1->id() (returns false again)
For me, this had the effect of having three rooms called fxrh.
|
|
Thanks to Clang for pointing this out.
|
|
To facilitate a possible change of a container type.
|
|
|
|
See https://marcmutz.wordpress.com/translated-articles/pimp-my-pimpl-
%E2%80%94-reloaded
|
|
|
|
[FEATURE] Add proper SONAME versioning
|
|
This doesn't affect the current build process much but distributions that
require libraries to be built as a shared object also often require
the use of symbol versioning using the SONAME, e.g openSUSE: https://en.opensuse.org/openSUSE:Shared_library_packaging_policy
|
|
|
|
This should avoid timeout event catching up on a not-yet-deleted-but-
already-invalid job object.
|
|
|
|
|