aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-11Introduce DISABLE_EVENTTYPE flagKitsune Ral
If defined (value doesn't matter), it will suppress generation of deprecated EventType constants. Not defined by default, as of 0.4.
2018-07-11EventFactory::make() should return nullptr in case of failureKitsune Ral
Otherwise factory chaining doesn't work right (an unknown event returned by a chained factory is treated as successful parsing).
2018-07-11Add missing #includesKitsune Ral
2018-07-11event.h: protect from readding factory methodsKitsune Ral
2018-07-11Room::isRedaction: disallow empty pointersKitsune Ral
They should not come anywhere around Room.
2018-07-11EventTypeRegistry::getMatrixType(): move implementation to .cppKitsune Ral
2018-07-10Room::postHtmlMessage() - a facility method to send HTML messagesKitsune Ral
2018-07-09Add a missing #includeKitsune Ral
2018-07-09Room: Revert from visit() to a combination of ifs and eventCastsKitsune Ral
Easier to read, and also easier compiler diagnostics if things go wrong. Still using visit() for state events processing though - it maintains that all lambdas return some value.
2018-07-09Fix legacy EventType values being incorrectly initialisedKitsune Ral
Static storage initialisation fiasco, as it is...
2018-07-08Revert perfect forwarding support in OmittableKitsune Ral
Turned out to work in unexpected ways when an Omittable<> gets copied.
2018-07-08Use constexpr functions instead of variablesKitsune Ral
MSVC struggles with template variables...
2018-07-08visit<>(): drop the overload for pointer-like objectsKitsune Ral
It confuses compilers and adds a mostly unneeded null check; it's dead easy to just dereference a pointer before passing it to visit<>().
2018-07-08visit<>(): support catch-all visitors on the tailKitsune Ral
2018-07-08eventCast(): generalize to smart pointersKitsune Ral
2018-07-08Omittable: support perfect forwardingKitsune Ral
2018-07-08TimelineItem::viewAs(): fix a typoKitsune Ral
2018-07-08TimelineItem: get(); validating viewAs<>()Kitsune Ral
Having get() allows to work with TimelineItem as a smart pointer.
2018-07-08eventCast<>()Kitsune Ral
2018-07-08Generalize weakPtrCast<>()Kitsune Ral
2018-07-08Move Omittable<> to util.hKitsune Ral
2018-07-07visit<>(): Add an overload accepting a default valueKitsune Ral
2018-07-07Remove [[gnu::const]] from linkifyUrls()Kitsune Ral
It's not a pure function by any account. Closes #377. Also: minor tweaks in util.cpp
2018-07-07Reinstate EventTypeRegistry, keeping EventTypeTraits<> aroundKitsune Ral
You can now get a (much more readable) Matrix type (event_mtype_t) for the internal event type code (event_type_t) using EventTypeRegistry::getMatrixType().
2018-07-07util.h: DISABLE_MOVE macroKitsune Ral
2018-07-04Add more #includes missingKitsune Ral
2018-07-04Support ignoring usersKitsune Ral
Closes #215.
2018-07-04lib/csapi: Updated from the latest API definitionsKitsune Ral
2018-07-04Merge branch 'kitsune-events-rewritten'Kitsune Ral
2018-07-04Add #include to fix FTBFS with qmakeKitsune Ral
2018-07-04Break down event.* into smaller filesKitsune Ral
We now have event.*, roomevent.*, stateevent.* and eventloader.h. If you only use event leaf-classes (such as RoomMemberEvent) you shouldn't notice anything.
2018-07-04Use QStringLiteral() and operator"" _ls() in network jobsKitsune Ral
2018-07-04Events: use a template structure instead of template variables; rearrange ↵Kitsune Ral
code into blocks A template member variable in it seemed to cause internal compiler error in MSVC 2017, let alone MSVC 2015...
2018-07-04TimelineItem::operator*()Kitsune Ral
2018-07-04Event types system remade to be extensibleKitsune Ral
There were two common points that had to be updated every time a new event is introduced: the EventType enumeration and one of 3 doMakeEvent<> specialisations. The new code has a template class, EventFactory<>, that uses a list of static factory methods to create events instead of typelists used in doMakeEvent<>(); the EventType enumeration is replaced with a namespace populated with constants as necessary. In general, EventType is considered a deprecated mechanism altogether; instead, a set of facilities is provided: is<>() to check if an event has a certain type (to replace comparison against an EventType value) and visit<>() to execute actions based on the event type (replacing switch statements over EventType values). Closes #129.
2018-07-04Merge branch 'kitsune-raw-literal-qstringliteral'Kitsune Ral
2018-07-04Connection: Trim raw data in emitted signalsKitsune Ral
If the payload is too large, an attempt to allocate a QString out of QByteArray may end with qBadAlloc(). So by default the data emitted in case of error are trimmed to 64KiB, and this can be overridden to a different value (or switched off entirely with <n>=0) by adding - DTRIM_RAW_DATA=<n> to CPP_FLAGS.
2018-07-04Experimental usage of QStringLiteral with a raw string literalKitsune Ral
2018-07-03Roll various switch case fallthrough markers into a macroKitsune Ral
2018-07-03Provide #include back-compatibility for REGISTER_ENUMKitsune Ral
2018-07-03SyncJob: log sync data statistics betterKitsune Ral
2018-07-02Fix FTBFSKitsune Ral
2018-07-01weakPtr -> weakPtrCastKitsune Ral
2018-07-01More cleanup and minor tweaksKitsune Ral
2018-07-01CleanupKitsune Ral
2018-06-30Try [[gnu::const]]Kitsune Ral
2018-06-30Use C++14 [[deprecated]] attribute instead of doc-commentKitsune Ral
Testing the waters in one place to start with.
2018-06-24converters.h: Support QSet<>Kitsune Ral
Also: toJson<optional> is no more (was #if 0'd anyway).
2018-06-16CMakeLists.txt: Don't build API files list if not neededKitsune Ral
2018-06-16Connection::doInDirectChat: "direct chat with self" featureKitsune Ral
Essentially - create/switch to the room with you as the only member instead of getting the first room where you happen to be flagged as a direct chat user (which is pretty unpredictable even if stable from the user point of view).