aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-28Better documentationKitsune Ral
Thanks to CII Best Practices Badge project for the hints and for the original CONTRIBUTING.md
2017-08-28Use -pedantic with compilers that support itKitsune Ral
2017-08-19BaseJob::Data: Small update to better match Qt APIKitsune Ral
Also: Query and Data constructors from initialization_list<> are no more explicit, as clang-tidy recommends.
2017-08-19Room::localUser() facility methodKitsune Ral
2017-08-08Vector has been renamed to Riot long agoKitsune Ral
2017-07-22SendEventJob: Fixed empty transaction id'sKitsune Ral
2017-07-19Restore compatibility with CMake versions below 3.3Kitsune Ral
2017-07-19Make sure -Wall is used regardless of the parent project settingsKitsune Ral
2017-07-18Merge pull request #77 from Quiark/masterKitsune Ral
Room event timestamp can also be undefined
2017-07-18Room event timestamp can also be undefinedRoman Plášil
2017-07-16Fixed too strict validations in (Room)EventKitsune Ral
2017-07-15Merge pull request #72 from QMatrixClient/kitsune-send-eventsKitsune Ral
Events creation and sending
2017-06-29Fixed building with Qt version=5.4; moved away a macro unused in headersKitsune Ral
2017-06-27Enable sending RoomMessageEventsKitsune Ral
1. PostMessageJob is now SendEventJob, which reflects two things: first, it's a PUT instead of a POST (POST for /send is not supported by the latest spec anyway), so that we could enable tracking transaction ids for local echo in the near future; second, it's no more just about messages, the job can support sending any room events (topic changes etc.). 2. Room::postMessage() now uses the new RoomMessageEvent API to send m.room.message events.
2017-06-22RoomMessageEvent: Simplify constructors, use QString msgType internallyKitsune Ral
QString msgType allows non-standard types (we don't want to restrict clients to types from the spec)
2017-06-22MessageEventContent: generalise mimeTypeKitsune Ral
mimeType is relevant to most of the content types, and at the same time getting a MIME type in a generic way is handy for clients to uniformly detect whether they can display the content and what renderer to use for it.
2017-06-22Enable creation of RoomMessageEventsKitsune Ral
RoomMessageEvent and MessageContentEvent::* classes have been massively overhauled to enable creation of m.room.message events locally instead of from JSON.
2017-06-22Enable creation and usage of Event and RoomEvent objects locally, including QMLKitsune Ral
This includes RoomEvent gaining transactionId property and addId() method so that it could gain ids when being/having been sent.
2017-06-22BaseJob::* facility classes: better constructionKitsune Ral
Use std::initializer_list instead of QList<> because we actually want to construct from initializer lists; and only enable Data(std::initializer_list) for older Qt's that don't have the same on the level of QJsonObject.
2017-06-22Connection is now able to generate transaction idsKitsune Ral
The generation algorithm doesn't support several Quaternions using the same accessToken, as of yet.
2017-06-13Removed RoomMessageEvent::userId in favor of RoomEvent::senderIdKitsune Ral
2017-06-07Merge pull request #69 from Quiark/pull-bridged-fieldKitsune Ral
Split bridge name into a separate field in user model
2017-06-07Adjust whitespaceRoman Plášil
2017-06-07Split user's bridge (IRC, Gitter) into a separate field in user model objectRoman Plášil
2017-06-07Merge pull request #68 from Quiark/pull-mark-invokableKitsune Ral
Make markAllMessagesAsRead() Q_INVOKABLE
2017-06-07Make markAllMessagesAsRead() Q_INVOKABLERoman Plášil
2017-06-02Merge pull request #66 from Quiark/reorgKitsune Ral
Expose userlist to QML
2017-06-02Add Room::memberNames() for nick completion in QMLRoman Plášil
2017-06-02Clean upRoman Plášil
2017-06-02Fix qmake compilationRoman Plášil
2017-05-28Merge pull request #65 from QMatrixClient/kitsune-simplify-eventsKitsune Ral
Events refactoring
2017-05-22Fixed building with CLang 3.5Kitsune Ral
2017-05-22Refactored EventsKitsune Ral
The biggest change is we have no pimpls in Event objects anymore - because it's two new's instead of one per Event, and we have thousands and even more of Events created during initial sync. The other big change is introduction of RoomEvent, so that now the structure of events almost precisely reflects the CS API spec. The refactoring made UnknownEvent unnecessary as a separate class; a respective base class (either RoomEvent or Event) is used for this purpose now. All the other changes are consequences of these (mostly of RoomEvent introduction).
2017-05-22CleanupKitsune Ral
2017-05-22Dispatch<>: Allow nullptr for a function; special-case GCC 4.8Kitsune Ral
2017-05-22util.h: lookup() uses forwarding refs; added Dispatch/dispatch and REGISTER_ENUMKitsune Ral
The Dispatch<> template and dispatch(), a facility function for it, simplify dispatching to functions that have different signatures that still can be converted to the same std::function<> type. The case in point is in event.cpp; Event::fromJson calls make() that always returns the type we need; however, once we have several possible base types (Event, RoomEvent, StateEvent), we'd have to either write a specific make() incarnation for each of them, or mess with function return type conversions. Dispatch<> helps to keep the code clean. REGISTER_ENUM is a cross-Qt versions approach to dumping enumeration values to qDebug() and the likes.
2017-05-18Merge pull request #64 from Fxrh/kitsune-osx-ciKitsune Ral
Enable OSX in Travis CI
2017-05-18Enable OSX in Travis CIKitsune Ral
2017-05-17Merge pull request #62 from Fxrh/kitsune-refactoringKitsune Ral
Code tweaks and cleanup
2017-05-13More code cleanup and tweaks; fine-tuning logs; performance improvementsKitsune Ral
After adding some profiling it became clear that to recalculate the room name and emit namesChanged() upon each member event is a waste, especially when there are thousands of those coming at initial sync (*cough* Matrix HQ room). So the room name is recalculated only once and unconditionally (in most cases this will boil down to checking whether name/canonicalAlias changed after processing the events batch), and namesChanged is only emitted once per batch, if any name or alias changed.
2017-05-13Refactored logging enhancementsKitsune Ral
logging.h/logging.cpp is now a full-fledged pair for all things logging. Two more categories added, EPHEMERAL and SYNCJOB, that control logging for ephemeral events and SyncJob, respectively (in particular, switching off EPHEMERAL greatly reduces the logspam about moving read markers and how many users have read up to which event).
2017-05-12BaseJob: Do not leak access token into the job configurationKitsune Ral
Before the access token was added to Private::requestQuery on every sendRequest() invocation, leading to the same access token being added up to the request once more with each retry.
2017-05-09Returned Connection::disconnectFromServer() for back-compatibilityKitsune Ral
2017-05-09README.md: Described how to use Qt logging categoriesKitsune Ral
2017-05-09Enable Travis CI webhook so that Matrix rooms could listenKitsune Ral
2017-05-09LeaveRoomJob now accepts a roomId, not a Room object; Room::leaveRoom() ↵Kitsune Ral
introduced; Connection and Room cleanup Helps to better encapsulate Room
2017-05-09Allow to get a Connection object of the RoomKitsune Ral
It's just natural, after all, Connection is a parent of Room. But seriously, this will be needed when we have rooms from different Connections living next to each other.
2017-05-09Code cleanup and tweaking (partially driven by clang-tidy)Kitsune Ral
Mainly it's about const-ification (in particular, passing const-refs instead of values) and deleting unneeded declarations/#includes. Since the changes alter the external interface, this is submitted as a PR for peer review. One of unneeded declarations/definitions is a virtual destructor in BaseJob descendants. Since a job object should be deleted through QObject::deleteLater() anyway (and it's the only correct way of disposing of the object), all deletions will call the stack of destructors through virtual QObject::~QObject(). Therefore even BaseJob could get on with a non-virtual destructor but for the sake of clarity BaseJob::~BaseJob() is still declared virtual.
2017-05-08Make QNetworkAccessManager member a singletonKitsune Ral
As Qt documentation advises, a single QNetworkAccessManager is enough for the whole Qt application.
2017-05-01Merge pull request #61 from elvisangelaccio/qloggingcategoryKitsune Ral
Port to categorized logging