aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-10-07Fix building with VS2013Kitsune Ral
2016-10-07Fixed leaks of RoomMessageEvent contentKitsune Ral
2016-10-07Use Q_DECLARE_TYPEINFO correctlyKitsune Ral
The previous code had no effect because QVector<Receipt> was instantiated before Q_DECLARE_TYPEINFO occurence.
2016-10-07Fixed massive leaks of Event objectsKitsune Ral
2016-10-05Check there are no non-members "typing" or "having read" messagesKitsune Ral
Normally, this shouldn't happen anyway - just a double-check,
2016-10-04Changed angle brackets to parentheses for user disambiguationKitsune Ral
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).
2016-09-21Room: don't emit signals if there are no message events receivedKitsune Ral
2016-09-21Merge pull request #31 from Fxrh/kitsune-sender-in-all-eventsKitsuneRal
Push sender from RoomTopicEvent to Event
2016-09-21Merge pull request #30 from Fxrh/fix-messages-orderingKitsuneRal
Fix messages ordering
2016-09-21Push sender from RoomTopicEvent to EventKitsune Ral
Because it's supposed to exist in (at least) all events from /sync.
2016-09-21Fixed the order of historical messagesKitsune Ral
2016-09-17Merge remote-tracking branch 'remotes/origin/master' into fix-messages-orderingKitsune Ral
2016-09-17Merge pull request #29 from Fxrh/dont-expose-syncjobKitsuneRal
Connection: Don't return SyncJob* from sync()
2016-09-16Group processing of state events as wellKitsune Ral
2016-09-16Room: change the way messages are orderedKitsune Ral
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.
2016-09-15Connection: Don't return SyncJob* from sync()Kitsune Ral
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.
2016-09-15Replace an array of room deconstruction log lines with a single connection ↵Kitsune Ral
deconstruction log line
2016-09-15Merge pull request #28 from Fxrh/correct-roomname-by-usernamesFelix Rohrbach
Correct user sorting for room name creation
2016-09-15More compact fix with the same meaningKitsune Ral
2016-09-15Correct user sorting for room name creationFelix Rohrbach
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.
2016-09-14Use Receipt by reference in a loopKitsune Ral
Thanks to Clang for pointing this out.
2016-09-14Room::messageEvents: switch to an alias instead of explicit QList<>Kitsune Ral
To facilitate a possible change of a container type.
2016-09-14Don't search for event_id and origin_server_ts in m.receipt eventsKitsune Ral
2016-09-14Initialize Room::Private more carefullyKitsune Ral
See https://marcmutz.wordpress.com/translated-articles/pimp-my-pimpl- %E2%80%94-reloaded
2016-09-13Update libqmatrixclient.priDavid A Roberts
2016-09-13Merge pull request #27 from Takios/masterKitsuneRal
[FEATURE] Add proper SONAME versioning
2016-09-12[FEATURE] Add proper SONAME versioningFabian Niepelt
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
2016-09-11Make sure syncJob pointer is null upon abandoningKitsune Ral
2016-09-11Explicitly stop the timer in finishJob()Kitsune Ral
This should avoid timeout event catching up on a not-yet-deleted-but- already-invalid job object.
2016-09-09Strictly require Qt librariesKitsune Ral
2016-09-08Connection: Fixed an unguarded usage of d->syncJob pointerKitsune Ral
2016-09-08Fix MediaThumbnailJobFelix Rohrbach
As the url-path seems to start with a slash, we had two slashes in the request. This broke the feature for some servers, especially when fetching icons from other servers.
2016-09-08Merge pull request #25 from Fxrh/kitsune-generic-dispatchKitsuneRal
2016-09-07A generic lookup(), and its usage in Event and RoomMessageEventKitsune Ral
Feel free to use whenever you need to convert another JSON key to some C++ object, or dispatch anything based on a JSON key.
2016-09-07Event::fromJson(): made the code more compact (correctly this time)Kitsune Ral
That might be not as efficient as a solution on variadic templates; but arguably easier to understand. Doesn't have the typo bug the previous version of this commit had.
2016-09-07More dead code removalKitsune Ral
2016-09-07Merge pull request #23 from Fxrh/kitsune-cmakelistsKitsuneRal
2016-09-07Merge pull request #24 from Fxrh/kitsune-settingsKitsuneRal
Settings classes
2016-09-07Temporarily revert "Event::fromJson(): made the code more compact" as it ↵Kitsune Ral
breaks highlighting This reverts commit 0fe83d59d76cd8f9c8f92d40cc58d9f5b082a84a.
2016-09-06Relaxed VS version a bit.Kitsune Ral
2016-09-06Corrected the faulty VS versionKitsune Ral
2016-09-06Fix building with VS2013Kitsune Ral
VS2013 doesn't like 'using' statements if a base class has private constructors (as in QSettings - Q_DISABLE_COPY makes a copy constructor private and deleted). Hence a workaround.
2016-09-06Remember the current SyncJob and allow to explicitly abandon itKitsune Ral
2016-09-06Cleanup after moving ConnectionPrivate::provideRoom()Kitsune Ral
2016-09-06Settings, SettingsGroup, AccountSettingsKitsune Ral
Settings is a trivial wrapper around QSettings that makes value() and setValue() available from QML (Tensor has the same class atm). SettingsGroup is a cleaner way to reach for sections inside QSettings. It doesn't refer to another QSettings class, rather derives from it and overrides functions that deal with groups. AccountSettings, contrary to the two above, is by no means generic: it serves the specific purpose of storing settings of a single account in a uniform way. Rationale of it is that key literals like "keep_logged_in" cannot be enforced, while function names can; and the same goes for QVariants stored inside - the class enforces specific types while allowing further extension by clients. Note that functions in QSettings are not virtual, so all these classes are not polymorphic.
2016-09-06Connection: homeserver(); Connection and ConnectionData: accessToken(); ↵Kitsune Ral
accessors de-virtualized Details: - New: Connection::homeserver(), returns the homeserver URL from inside ConnectionData - New/Modify: Connection::accessToken() and ConnectionData::accessToken() - because we will also have refresh tokens eventually; deprecate token() for the same reason - Modify: Connection::user(), token(), accessToken() are no more virtual (they should have never been, these are plain accessors, after all)
2016-09-06Set CMAKE_BUILD_TYPE if none is specifiedKitsune Ral
2016-08-31QList<Event*> -> using Events=QVector<Event*>Kitsune Ral
2016-08-31Event::fromJson(): made the code more compactKitsune Ral
That might be not as efficient as a solution on variadic templates; but arguably easier to understand.
2016-08-31Room: Drop unused codeKitsune Ral