aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-25Room: Remove C++14 code from the header fileKitsune Ral
This will provide some backwards-compatibility to clients that are not ready to move _their_ code to C++14 (at least, it will allow them to not add C++14 requirement to their makefiles as of yet).
2017-12-25BaseJob: consolidate job timeout configurationKitsune Ral
This prepares the backend to enable timeouts/retry intervals configurable from clients.
2017-12-25Connection: Be more accurate with lambda capturesKitsune Ral
2017-12-25Fix CIKitsune Ral
Old GCC was still invoked; qmake-based builds weren't switched to C++14.
2017-12-25Now really switching to the new toolchain: C++14, GCC/Clang 5, Qt 5.6Kitsune Ral
Also a bit of code tightening with some C++14 (but not only) things.
2017-12-25Merge branch 'master' into kitsune-gtadKitsune Ral
2017-12-25ReceiptEvent: use QVector instead of std::vectorKitsune Ral
Because we should practice what we preach in CONTRIBUTING.md.
2017-12-25CONTRIBUTING.md refreshed and slightly extendedKitsune Ral
2017-12-25Use pimpl for AvatarsKitsune Ral
2017-12-25Code cleanupKitsune Ral
2017-12-25Qt 5.6 or newer is required from now onKitsune Ral
2017-12-21Connection::logout: supply receiver to connect(job,...)Kitsune Ral
2017-12-20Connection::accessToken - return QByteArray instead of QStringKitsune Ral
Because that's what it really is.
2017-12-20Clean away legacy settings when possibleKitsune Ral
Otherwise they stick around when deleting actual settings (e.g. at logout).
2017-12-19Don't use LoginJob::homeServer() anymoreKitsune Ral
Because the respective parameter in /login result is deprecated. Closes #137.
2017-12-16Connection: proactively create a Room object upon joining a roomKitsune Ral
So that clients could start using this object without waiting for the next sync.
2017-12-16CMakeLists.txt: Make -Wreturn-type an errorKitsune Ral
Because a missing return in a non-void function is always an error.
2017-12-16Fix an assertion failure when redacting an unknown eventKitsune Ral
Closes #135.
2017-12-14Another fix for CI on OSXKitsune Ral
2017-12-14Add a missing header to fixing building on OSXKitsune Ral
2017-12-14Declare SyncRoomData as C++-movableKitsune Ral
This fixes compilation with older compilers that try to instantiate a copy constructor (and fail because unique_ptr) but actually is more proper in general. Also: do not advertise the class as Q_MOVABLE_TYPE: this was useful for QList/QVector when SyncRoomData was copyable; now it isn't, and Qt containers can't deal with non-copyable classes at all.
2017-12-14One more fix for older compilersKitsune Ral
2017-12-14Fixed building with older compilersKitsune Ral
2017-12-14That virtual ~Event() mentioned in the previous commit messageKitsune Ral
2017-12-14Move all internal event pointers to std::unique_ptr<>Kitsune Ral
This causes the following changes along the way: - Owning<> template is decommissioned. - event.h has been rearranged, and Event/RoomEvent::fromJson static methods have been replaced with an external makeEvent<> function template. A side effect of that is that one cannot use a factory with a type other than the one it's defined for (i.e. you cannot call makeEvent<TypingEvent>) but that feature has been out of use for long anyway. - Room::doAddNewMessageEvents() and Room::doAddHistoricalMessageEvents() have been removed, giving place to Room::onAddNewTimelineEvents() and Room::onAddHistoricalTimelineEvents(). The most important difference is that all code that must be executed now resides in addNewMessageEvents() (it moved from Room to Room::Private) and classes inheriting from Room are not obliged to call the overridden function from the overriding function (they can do it but those functions have empty bodies in Room). This was a long overdue change, and owning pointers simply mandated it. Room::onAddNewTimelineEvents/onAddHistoricalTimelineEvents should not do anything with the passed range in terms of ownership, it's just a way to allow the derived class to update his data in due course. - Room::Private::dropDuplicateEvents() and Room::Private::insertEvents(), notably, have been updated to work with owning pointers. insertEvents() move()s pointers to the timeline, while dropDuplicateEvents uses remove_if instead of stable_partition and doesn't explicitly delete event objects. Also, a bugfix: Event accidentally had not virtual destructor for quite a long time. According to the standard, deleting an object through a pointer to a base class without a virtual destructor leads to UB. So the fact that libqmatrixclient clients even worked all these months is mere coincidence and compiler authors good will :-D
2017-12-14Room::markMessagesAsRead(): Move private overload to pimplKitsune Ral
2017-12-13EventsBatch: document the classKitsune Ral
2017-12-13Refactoring around Room::Private::insertEvent(s)Kitsune Ral
2017-12-12Deduplicate events within a batchKitsune Ral
Closes #130.
2017-12-12Fix a compiler warningKitsune Ral
2017-12-11Whitelist origin_server_ts in redaction logicKitsune Ral
The Spec doesn't mention it but both Synapse and Riot act as if origin_server_ts was whitelisted, and it was also confirmed in #matrix-dev to be reasonable behaviour.
2017-12-10Fixed compilation with older QtKitsune Ral
2017-12-10Enable sending requests for redaction to the serverKitsune Ral
Closes #118
2017-12-10Process incoming redactionsKitsune Ral
This only applies to new messages; historical redaction events are just skipped because historical events are already redacted on the server side. Closes #117.
2017-12-10RedactionEvent and RoomEvent::redactedBecause()Kitsune Ral
A RoomEvent now has an optional pointer to a RedactionEvent that is non-null if the room event is redacted. transactionId and serverTimestamp are only filled if the event is not redacted. There's no way to construct a redacted event as of yet.
2017-12-10Introduce RoomEventsViewKitsune Ral
Will be used in Room to work with ranges of events.
2017-12-10EventType: Add more enumeration valuesKitsune Ral
2017-12-10Use the generated PostReceiptJob; don't compile unused job classesKitsune Ral
Rewire Connection::postReceipt() to the generated job too; this call is still deprecated though.
2017-12-10Log room creation only onceKitsune Ral
2017-12-10Elaborate a deprecation commentKitsune Ral
2017-12-10Fix setting the homeserver hostname (not URL) coming from /loginKitsune Ral
2017-12-07Fix compilation with Qt 5.2Kitsune Ral
2017-12-07PasswordLogin: Fix the legacy job class to compile with new BaseJob::DataKitsune Ral
2017-12-07New generated jobs for: room directory, 3PIDs, redactions, typing ↵Kitsune Ral
notifications and others Closes #128 (the issue has the full list of jobs arriving herewith).
2017-12-07GTAD: Enable content-repo stubs generationKitsune Ral
2017-12-07Use new GTAD features: avoid copying of custom schemas; inline body where ↵Kitsune Ral
appropriate Body inlining is needed in content-repo cases and also cases with freeform JSON in the body (such as the one of upcoming PostReceiptJob).
2017-12-07New generated jobs for: room directory, 3PIDs, redactions, typing ↵Kitsune Ral
notifications and others Closes #128 (the issue has the full list of jobs arriving herewith).
2017-12-07Make BaseJob::Data consume QByteArray as well, not only QJsonObjectKitsune Ral
This is needed to support cases of content-repo, where the request/response bodies are not JSON.
2017-12-07jobs/generated: don't rely on QString's COW; firmer formattingKitsune Ral
2017-12-07Connection: no more default to matrix.org; update HS URL from /login responseKitsune Ral